• λ我爱Aspx >> Asp.Net >> 使用ICallbackEventHandler接口实现页面无刷新
  • 使用ICallbackEventHandler接口实现页面无刷新

  • :未知  Դ:internet  :2007-5-20 16:44:44  ؼ:
  • StringBuilder sb = new StringBuilder();

    // Check if this is a postback.

    sb.Append("No page postbacks have occurred.");

    if (Page.IsPostBack)

    {

    sb.Append("A page postback has occurred.");

    }

    // Write out any messages.

    MyLabel.Text = sb.ToString();

    // Get a ClientScriptManager reference from the Page class.

    ClientScriptManager cs = Page.ClientScript;

    // Define one of the callback script's context.

    // The callback script will be defined in a script block on the page.

    StringBuilder context1 = new StringBuilder();

    context1.Append("function ReceiveServerData1(arg, context)");

    context1.Append("{");

    context1.Append("Message1.innerText = arg;");

    context1.Append("value1 = arg;");

    context1.Append("}");

    // Define callback references.

    String cbReference1 = cs.GetCallbackEventReference(this, "arg",

    Ҷƪл˵?
  • һƪUTF-8 and Unicode FAQ
    һƪ不用.net和其组件用asp访问webservice