Site/Demo.aspx.cs
(开头部分) 9KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Drawing;
using Winthusiasm.HtmlEditor;
public partial class Demo : System.Web.UI.Page
{
protected string initialHtml = @"<h1>Heading 1</h1>
<p>This text is <strong>bold</strong>, this <em>italic</em>, and this <u>underlined</u>.</p>
<p>This text is <span style='font-family: Arial'>Arial</span>, this <span style='font-family: Garamond'>Garamond</span>, and this <span style='font-family: Verdana'>Verdana</span>.</p>
<ul>
<li>Bullet 1 </li>
<li>Bullet 2</li>
</ul>";
protected string infoText = @"<h2>HTML Editor for ASP.NET AJAX</h2>
<p>This <strong>Basic Edition</strong> is designed specifically for ASP.NET AJAX.</p>
<p>Features:</p>
<ol>
<li>Implements the <strong>IScriptControl </strong>interface. </li>
<li>Creates a related client-side JavaScript object derived from <em>Sys.UI.Control</em>. </li>
<li>Runs within an <strong>UpdatePanel</strong>. </li>
<li>Runs in multiple instances.</li>
</ol>
<p>This initial text is set in the code-behind C# located in Demo.aspx.cs.</p>
<p>In this sample web page, a single HtmlEditor control is placed within an UpdatePanel. The page also includes a second UpdatePanel that contains the preview text displayed within the <strong>Preview</strong> box at the bottom of the page.</p>
<p>To test the editor:</p>
<ul>
<li>Click either the Design or Html tab to display the editor in either mode. </li>
<li>Modify the text in either mode. </li>
<li>Save changes by clicking the Save button.</li>
<li>Click the Preview button to display the saved text within the boxed area below, either as formatted or unformatted html, depending on the radio button settings. </li>
<li>Click the Clear button to clear the editor text. </li>
<li>Click the Info button to replace the text you currently see in the editor with the info text defined in the code-behind C#.</li>
<li>Click the Trigger Update button to trigger an Update of the editor UpdatePanel.</li>
<li>Check/Uncheck the XHTML box to enable/disable the conversion to XHTML.</li>
<li>Check/Uncheck the Deprecated box to enable/disable the conversion of deprecated syntax.</li>
<li>Check/Uncheck the Paragraphs box to enable/disable the conversion of paragraphs in Internet Explorer.</li>
<li>Click one of the Toggle Mode radio buttons to change how the user switches between Design and Html mode.</li>
<li>Click one of the Color Scheme radio buttons to change the overall color scheme (The Custom setting is the same as the Default setting until the developer modifies specific color elements).</li>
<li>Check the Flat toolstrips box to display the Toolstrips without a background image.</li>
</ul>";
protected bool InternetExplorer
{
get { return Request.Browser.Browser.Equals("IE"); }
}
protected void Page_Load(object sender, EventArgs e)
{
ScriptManager sm = ScriptManager.GetCurrent(this);
sm.RegisterAsyncPostBackControl(SaveButton);
sm.RegisterAsyncPostBackControl(ClearButton);
后面还有 198 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。