Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

asp.netÔÚÓÃajaxµÄʱºòÈçºÎµ¯³ö¶Ô»°¿ò


<form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div>
    <asp:updatepanel ID="UP" runat="server">
      <ContentTemplate>
        <asp:Button runat="server" Text="Button" onclick="Unnamed2_Click" />
      </ContentTemplate>
   </asp:updatepanel>
    </div>
</form>
ASP.NET2.0ÖÐAJAXʹÓÃеÄManager ÀàÀ´¹ÜÀí£¬¶ø²»¼æÈÝÔ­À´µÄ ClientManager Àà ,ËùÒÔÓÃresponse.write("<script>alert('Ìáʾ£ºµãÎÒÁË!')</script>")ºÍ
this.Client.RegisterClientBlock(this.GetType(), "name", "<>alert('Ìáʾ£ºµãÎÒÁË!');</>", true);
Page.Client.RegisterClientBlock(this.GetType(), "name", "<>alert('Ìáʾ£ºµãÎÒÁË!);</>", true);
ÕâЩ·½·¨¶¼ÊÇÎÞЧµÄ.
¿ÉÒÔÓÃÒÔÏ·½·¨Ð´´úÂëʵÏÖ
ScriptManager.RegisterStartupScript(UP, UP.GetType(), "", "alert('µãÎÒÁË');", true);
ÕâÑù¾Í¿ÉÒÔʵÏÖÁË!
//UPÊÇupdatepanel µÄID
ת×Ôhttp://www.csharp360.com/bbs/viewthread.php?tid=233&extra=


Ïà¹ØÎĵµ£º

AjaxʵÏÖµÄÃ÷ϸȥ³ýÖØ¸´ datatableÈ¥³ýÖØ¸´

ajax  Detail.aspxÒ³Ãæ
 protected void Page_Load(object sender, EventArgs e)
    {
        Thread.Sleep(500);
        string Keyid = Request.QueryString["Id"].ToString();
      ......

asp.net ·þÎñÆ÷¶Ë¿Ø¼þÖÐ µ¯³ö¶Ô»°¿ò ²Ù×÷

HTML´úÂ룺
<script language="javascript" event="onclick" for="ImageButton1">
 return confirm('È·¶¨Òª±£´æ±ä¸üÂð£¿');//·µ»Øfalseʱ²»Ö´ÐÐImageButton1_Click·½·¨£¬·µ»ØtureʱִÐÐImageButton1_Click·½·¨
</script> 
 <asp:ImageButton ID="ImageButton1" runat="server" ImageAlig ......

ASP.NET Mischellous II

@import url(¡°layout.css¡±)
CSS Selectors: *, p, div span, div > span, *[href], li+li, .title, #container, #title p:first-child, a:link, a:hover, a:visited, p:before, p:after
p:after{content:¡¯url(images/quote.gif)¡¯}
!important State Mode: Off, InProc, StateServer, SQLServer, C ......

ASP.NETʹÓÃRequest»ñÈ¡À´Ô´ÍøÖ·URL²ÎÊý

Request¶ÔÏó¹¦ÄÜÊÇ´Ó¿Í»§¶ËµÃµ½Êý¾Ý£¬³£ÓõÄÈýÖÖÈ¡µÃÊý¾ÝµÄ·½·¨ÊÇ£ºRequest.Form¡¢Request.QueryString£¬Request¡£ÆäµÚÈýÖÖÊÇǰÁ½ÖÖµÄÒ»¸öËõд£¬¿ÉÒÔÈ¡´úǰÁ½ÖÖÇé¿ö¡£¶øÇ°Á½ÖÖÖ÷Òª¶ÔÓ¦µÄFormÌύʱµÄÁ½ÖÖ²»Í¬µÄÌá½»·½·¨£º·Ö±ðÊÇPost·½·¨ºÍGet·½·¨¡£
        Request ¶ÔÏóµÄÊôÐԺͷ½·¨± ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ