Whidbey中无刷新机制

时间:2010-03-09 11:59:44  来源:第二电脑网  作者:第二电脑网

  第二电脑网导读:w3.org/TR/xhtml11/DTD/xhtml11.dtd">      <script runat="server">    protected void Page_Load(object sender, EventArgs e)    {    string callback = Page.GetCallbackEventReference(this, "this.value", "ProcessReverse", null);  &...
  正文:<%@ Page Language="C#" %>
  <%@ Implements Interface="System.Web.UI.ICallbackEventHandler" %>
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  
  <script runat="server">
   protected void Page_Load(object sender, EventArgs e)
   {
   string callback = Page.GetCallbackEventReference(this, "this.value", "ProcessReverse", null);
   this.TextBox1.Attributes.Add("onchange", callback);
   }
  
   string ICallbackEventHandler.RaiseCallbackEvent(string eventArgument)
   {
   char [] chars = eventArgument.ToCharArray();
   Array.Reverse(chars);
   return new string(chars);
   }
  </script>
  
  <html xmlns="http://www.w3.org/1999/xhtml" >
  <head runat="server">
   <title>Untitled Page</title>
  </head>
  <body>
   <form id="form1" runat="server">
   <div>
   <ASP/ target=_blank class=infotextkey>asp:TextBox ID="TextBox1" Runat="server"></asp:TextBox>
   </div>
  
   </form>
  </body>
  </html>
  <script>
  function ProcessReverse(result,context)
  {
   document.all.TextBox1.value = result;
  }
  </script>

Whidbey中无刷新机制》由第二电脑网原创提供,转载请注明:http://www.002pc.com/master/College/Programming/aspnet/13154.html


关键字:

关于《Whidbey中无刷新机制》文章的评论

站内搜索: 高级搜索

热门搜索: Windows style 系统 tr IP QQ CPU 安装 function 注册 if td