ASP.NET µ¯³ö´°¿ÚÎÊÌâ
1.updatepanel Öе¯³öÌáʾ´°¿Ú
ScriptManager.RegisterStartupScript(UpdatePanel1, UpdatePanel1.Page.GetType(), "message", "alert('°¢ÐÜ£¡');", true);
2.ÔÚд°¿ÚÖдò¿ªÁ´½Ó
Response.Write(" <script>window.open('NewPage.aspx') </script>");
²»¹ýÿµ±µ¯³öÕâ¸öÍøÒ³¹ýºó,ÔÀ´µÄÖ÷ÍøÒ³µÄÒ³Ãæ×ÖÌå×Ô¶¯¾Í±ä´ó,ÒòΪASP.NET ÖÐËæ±ãʹÓà Response.Write,»á´òÂÒ ASP.NET µÄÊä³öÁ÷˳Ðò
¸Ä½ø·½·¨£º
string js = "<script language=javascript>" + "window.open('NewPage.aspx','newwindow', 'height=600, width=800, top=100, " + "left=100, toolbar=no, menubar=no, scrollbars=no, resizable=yes,location=no, " + "status=no');</script>";
Page.RegisterStartupScript("js", js);
3.Ò³Ã浯³öÏûÏ¢
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('°¢ÐÜ£¡')", true);
Ïà¹ØÎĵµ£º
//µÚÒ»ÖÖ·½Ê½
Response.Cookie("CookieÃû³Æ").value="Öµ" //дÈë
username=Request.Cookies("CookieÃû³Æ").value// ¶ÁÈ¡
//µÚ¶þÖÖ·½Ê½
HttpCookie hcCookic = new HttpCookie("CookieÃû³Æ","Öµ");
Response.Cookies.Add(hcCoo ......
½ñÌìµÄÈÎÎñÊÇÄܹ»ÔÚasp.netϽ¨Á¢Îļþϵͳ£¬Ò²¾ÍÊÇÄܹ»ÔÚasp.netµÄÐéÄâĿ¼Ï½¨Á¢Îļþ¼Ð¡¢Îļþ¡¢ÐÞ¸ÄÎļþ¼Ð¡¢Îļþ¡¢É¾³ýÎļþ¼Ð¡¢ÎļþµÈ¡£½¨Á¢Îļþ¼Ð¡¢ÎļþºÜ˳Àû£¬Ã»ÓÐÓöµ½ÈκÎÎÊÌ⣬ֱ½ÓÓÃDirectory¾²Ì¬Àà¾Í¿ÉÒÔ×öÁË¡£
µ«ÊÇ£¬ÔÚɾ³ý¡¢ÐÞ¸ÄÎļþ¼Ð¼°ÎļþµÄʱºòÓöµ½ÁËÆæ¹ÖµÄÎÊÌ⣺ÿ´ ......
һλASP.net³õѧÕßѧϰ¹ý³ÌÖÐÕûÀíµÄ±¸Íü¼£¬°üÀ¨“´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£¬Îª°´Å¥Ìí¼Ó¶Ô»°¿ò£¬É¾³ý±í¸ñÑ¡¶¨¼Ç¼£¬É¾³ý±í¸ñ¼Ç¼¾¯¸æ”µÈµÈ³£¼ûÎÊÌâµÄ½â¾ö·½·¨(ÍøÉÏ¿´µ½Í¦ºÃµÄ,¹²ÏíÒ»ÏÂ)¡£
1. ´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º
¡¡¡¡´«ËͲÎÊý£º
response.write("<script>window.open
('*.aspx?id="+t ......
protected void Page_Load(object sender, EventArgs e)
{
getAllControlValue(this);
}
Hashtable getAllControlValue( object PageOrUserContro ......