原創|其它|編輯:郝浩|2009-05-20 10:05:18.000|閱讀 1440 次
概述:5月13號,AJAX Control Toolkit 發布了新的release,其中包含了三個新的控件:HTMLEditor 、ComboBox 和 ColorPicker.
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
AJAX Control Toolkit 并沒有得到廣泛的應用,國內。多歸咎于其效率較低(可參考 而微軟此舉會把 AJAX Control Toolkit 引向何途呢?讓我拭目以待 ...
前言
<5 月 13 號。 AJAX Control Toolkit 發布了新的 releas 其中包括了三個新的控件: HTMLEditor ComboBox 和 ColorPick 作用和用法如下:
此版本包括了一下三個重要的新控件 :
并入 AJAX Control Toolkit. 就是日常所用的所見即所得 HTML 編輯控件( . 而這個控件則是 Obout 出品的目前開放源碼。;
盡管樣子做的比較粗糙,顧名思義。但 ASP.NET 總算有了官方支持的復合式下拉列表控件。
以彈出 P 形式,類似于 CalendarExtend 這個空間也作為 Extender 附著在 TextBox 上。為我提供經常用到客戶端顏色選取功能。
ComboBox 和 ColorPick 與原有的 AJAX Extender 差不多,其中。其源文件也是繼承自 ExtenderControlBas 一個 c# 類以及相應的 Behavior.j
使用方式分別如下:
<asp:TextBox runat="server" ID="Text" /><ajaxToolkit:ColorPickerExtender runat="Server" BehaviorID="ColorPicker" TargetControlID="Text" /><ajaxToolkit:ComboBox ID="ComboBox1" runat="server" DropDownStyle="Simple"><asp:ListItem>&</asp:ListItem><asp:ListItem>a</asp:ListItem><asp:ListItem>A</asp:ListItem><asp:ListItem>AA</asp:ListItem><asp:ListItem>AaA</asp:ListItem><asp:ListItem>b</asp:ListItem><asp:ListItem>bc</asp:ListItem><asp:ListItem>bcd</asp:ListItem><asp:ListItem>bd</asp:ListItem><asp:ListItem>c</asp:ListItem><asp:ListItem>ee fff</asp:ListItem></ajaxToolkit:ComboBox>
支持多種配置,而 HTMLEditor 則是一個相對獨立的控件。比較復雜,一般配置的使用方式如下:
<HTMLEditor:Editor runat="server" Id="editor" Height="300px" AutoFocus="true" Width="100%" />
也可以根據需要配置成其它模式:
<customEditors:Lite runat="server" id="editor" Height="400px" Width="500px" /><customEditors:LiteNoBottom runat="server" id="editor" Height="400px" Width="500px" />
示例如下: 也可以從客戶端添加。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "//www.w3.org/P/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="//www.w3.org/1999/xhtml"><head><title>Displaying HTMLEditor in an htm page</title><script src="Script/MicrosoftAjax.debug.js" type="text/javascript"></script><script src="AjaxControlToolkit/3.0.20820.16598/3.0.20820.0/AjaxControlToolkit.Common.Common.js" type="text/javascript"></script><script src="AjaxControlToolkit/3.0.20820.16598/3.0.20820.0/AjaxControlToolkit.ExtenderBase.BaseScripts.js" type="text/javascript"></script><script src="AjaxControlToolkit/3.0.20820.16598/3.0.20820.0/AjaxControlToolkit.HTMLEditor.ClientSideEditor.js" type="text/javascript"></script><script src="AjaxControlToolkit/3.0.20820.16598/3.0.20820.0/AjaxControlToolkit.DynamicPopulate.DynamicPopulateBehavior.js" type="text/javascript"></script><link href="AjaxControlToolkit/3.0.20820.16598/3.0.20820.0/AjaxControlToolkit.HTMLEditor.CssAndImages/Css/Editor.css" rel="stylesheet" type="text/css" /><style type="text/css">{:11px Verdana;:#315686;:underline;}{:crimson;}</style></head><body><a href="../HTMLEditor.aspx">< Back to <strong>HTMLEditor</strong> page</a><br /><br /><form action="ToolkitTest.htm"><textarea id="editor" style="width:100%; height:600px;"><span style="font-weight: bold;">Hello world</span> </textarea></form><script type="text/javascript">//<![CDATA[ Sys.Application.add_init function {//content: "Another <span style=\"font-weight: bold;\">Hello world</span>
".> //width: "100%".> //height: "700px".>
a
font
color
text-decoration
a:hover
color
{
imagesPath: "AjaxControlToolkit/3.0.20820.16598/3.0.20820.0/AjaxControlToolkit.HTMLEditor.CssAndImages/Images/".>
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉載自:博客園