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

编辑器/阅读器

开发平台:

C#

  1. <%@Page Language="C#" ValidateRequest="false" ContentType="text/html"%>
  2. <%@Register TagPrefix="dntb" Namespace="DotNetTextBox" Assembly="DotNetTextBox"%>
  3. <script runat="server" language="C#">
  4. private void Page_Load(object sender, System.EventArgs e)
  5. {
  6. if (!IsPostBack)
  7. {
  8. 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>";
  9. WebEditor2.Text = "<a href=http://www.aspxcn.com.cn><img src='system_dntb/skin/xp/img/logo.gif' alt='DotNet中华网版权所有' width=260 height=60 border=0></a>";
  10. }
  11. }
  12. private void Button1_OnClick(object sender, System.EventArgs e)
  13. {
  14. WebEditor2.Text=WebEditor1.Text;
  15. }
  16. private void Button2_OnClick(object sender, System.EventArgs e)
  17. {
  18. WebEditor1.Text="";
  19. }
  20. </script>
  21. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  22. <html xmlns="http://www.w3.org/1999/xhtml" >
  23. <head>
  24. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  25. <title>演示:多控件应用实例(C#)</title>
  26. <style type="text/css">
  27. <!--
  28. body {
  29. font-size: 9pt;
  30. }
  31. hr {
  32. border: dotted #AFAFAF;
  33. }
  34. input {
  35. font-size: 9pt;
  36. border: 1px ridge #999999;
  37. background-color: #FFFFFF;
  38. cursor:pointer;
  39. }
  40. TABLE {
  41. FONT: 9pt 宋体,Verdana,Arial
  42. }
  43. -->
  44. </style>
  45. </head>
  46. <body>
  47.     <table width="555" align="center">
  48.         <tr>
  49.             <td valign="top">
  50.                 <fieldset>
  51.                     <legend>演示说明</legend>&nbsp; &nbsp; 本例子演示了如何使用两个以上的DotNetTextBox控件,并且控件之间互相传递数据!</fieldset>
  52.             </td>
  53.         </tr>
  54.     </table>
  55.     <br />
  56. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  57.   <tr>
  58.     <td align="center"><form id="Form1" runat="server">
  59.         <p align="center"><DNTB:WebEditor id="WebEditor1" Skin="skin/default/" runat="server"></DNTB:WebEditor> </p>
  60.         <p align="center"><DNTB:WebEditor id="WebEditor2" Child=True Skin="skin/xp/" runat="server"></DNTB:WebEditor> </p>
  61.         <p align="center"> 
  62.           <asp:Button id="Button1" CssClass="input" OnClick="Button1_OnClick" runat="server" Text="提交内容"></asp:Button>
  63.           <asp:Button id="Button2" CssClass="input" OnClick="Button2_OnClick" runat="server" Text="清空内容"></asp:Button>
  64.         </p>
  65.       </form></td>
  66.   </tr>
  67. </table>
  68. </body>
  69. </html>