demo_skin_vb.aspx
上传用户:lanchensha
上传日期:2022-02-27
资源大小:7530k
文件大小:3k
源码类别:

编辑器/阅读器

开发平台:

C#

  1. <%@Page Language="vb" ValidateRequest="false" ContentType="text/html"%>
  2. <%@Register TagPrefix="dntb" Namespace="DotNetTextBox" Assembly="DotNetTextBox"%>
  3. <script runat="server" language="vb">
  4. Private Sub Page_Load(obj As object,e As eventargs)
  5.         if Not IsPostBack then
  6. WebEditor1.Text = "<a href=http://www.aspxcn.com.cn><img src='system_dntb/skin/default/img/logo.gif' alt='DotNet中华网版权所有' width=260 height=60 border=0></a>"
  7. end if
  8. End Sub
  9.     Private Sub Button1_OnClick(ByVal obj As Object, ByVal e As EventArgs)
  10.         label1.Text = "<hr><b>以下是DotNetTextBox控件提交的内容</b>:<br>" + WebEditor1.Text
  11.     End Sub
  12.     Private Sub Button2_OnClick(ByVal obj As Object, ByVal e As EventArgs)
  13.         WebEditor1.Text = ""
  14.     End Sub
  15. Private Sub ChangedMenu(obj As object,e As eventargs)
  16.         WebEditor1.MenuConfig = menu.SelectedItem.Value
  17. End Sub
  18. Private Sub ChangedSkin(obj As object,e As eventargs)
  19. WebEditor1.Skin=skin.SelectedItem.Value     
  20. End Sub
  21. </script>
  22. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  23. <html xmlns="http://www.w3.org/1999/xhtml" >
  24. <head>
  25. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  26. <title>演示:个性化应用实例(VB.NET)</title>
  27. <style type="text/css">
  28. <!--
  29. body {
  30. font-size: 9pt;
  31. }
  32. hr {
  33. border: dotted #AFAFAF;
  34. }
  35. input {
  36. font-size: 9pt;
  37. border: 1px ridge #999999;
  38. background-color: #FFFFFF;
  39. cursor:pointer;
  40. }
  41. TABLE {
  42. FONT: 9pt 宋体,Verdana,Arial
  43. }
  44. -->
  45. </style>
  46. </head>
  47. <body>
  48.     <table width="560" align=center>
  49.         <tr>
  50.             <td valign="top" style="width: 556px">
  51.                 <fieldset>
  52.                     <legend>演示说明</legend>&nbsp; &nbsp; 本例子演示了通过下拉选择框变换DotNetTextBox控件的个性化设置,包括控件的皮肤及菜单功能!</fieldset>
  53.             </td>
  54.         </tr>
  55.     </table>
  56.     <br />
  57. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  58.   <tr>
  59.     <td align=center><form id="Form1" runat="server">
  60. [控件皮肤选择]:<asp:dropdownlist id="skin" AutoPostBack="true" OnSelectedIndexChanged="ChangedSkin" runat="server">
  61. <asp:listitem value="skin/default/">标准风格</asp:listitem>
  62. <asp:listitem value="skin/xp/">WINXP风格</asp:listitem>
  63. </asp:dropdownlist>
  64.         &nbsp;&nbsp;
  65. [菜单功能选择]:<asp:dropdownlist id="menu" AutoPostBack="true" OnSelectedIndexChanged="ChangedMenu" runat="server">
  66. <asp:listitem value="default.config">默认</asp:listitem>
  67. <asp:listitem value="custom1.config">自定义1</asp:listitem>
  68. <asp:listitem value="custom2.config">自定义2</asp:listitem>
  69. <asp:listitem value="all.config">全功能</asp:listitem>
  70. </asp:dropdownlist>
  71.         <p align="center"><DNTB:WebEditor id="WebEditor1" runat="server"></DNTB:WebEditor> </p>
  72.         <p align="center"> 
  73.           <asp:Button id="Button1" CssClass="input" OnClick="Button1_OnClick" runat="server" Text="提交内容"></asp:Button>
  74.           <asp:Button id="Button2" CssClass="input" OnClick="Button2_OnClick" runat="server" Text="清空内容"></asp:Button>
  75.         </p>
  76.       </form></td>
  77.   </tr>
  78. </table>
  79. <asp:label runat="server" ID="label1"></asp:label>
  80. </body>
  81. </html>