Asp.net³£ÓÃÓï¾ä20Ìõ.//µ¯³ö¶Ô»°¿ò.µã»÷תÏòÖ¸¶¨Ò³Ãæ
1.//µ¯³ö¶Ô»°¿ò.µã»÷תÏòÖ¸¶¨Ò³Ãæ
Response.Write(" <script>window.alrt('¸Ã»áԱûÓÐÌá½»ÉêÇë,ÇëÖØÐÂÌá½»£¡') </script>"); Response.Write(" <script>window.loation='http://www.cnblogs.com/kevin1031" target="_blank">http://www.cnblogs.com/kevin1031' </script>");
2.//µ¯³ö¶Ô»°¿ò
Response.Write("<script language="javascript">alrt('²úÆ·Ìí¼Ó³É¹¦£¡') </script>");
3.//ɾ³ýÎļþ
string filename ="20059595157517.jpg"; pub.util.DeleteFile(HttpContext.Current.Server.MapPath("../file") +filename);
4.// °ó¶¨ÏÂÀÁбí¿òdatalistSystem.Data.DataView dv=conn.Exec_ex("select -1 as code,'ÇëÑ¡Ôñ¾ÓªÄ£Ê½' as content from dealin union select code,content from dealin"); this.dealincode.DataSource=dv; this.dealincode.DataTextField="content"; this.dealincode.DataValueField="code"; this.dealincode.DataBind(); this.dealincode.Items.FindByValue(dv[0]["dealincode"].ToString ()).Selected=true;
5.//ʱ¼äÈ¥ÃëÏÔʾ<%# System.DateTime.Parse(DataBinder.Eval (Container.DataItem,"begtime").ToString()).ToShortDateString()%>
6.// ±êÌâ´øÁ´½ÓCode<%# " <a class=\"12c\" target=\"_blank\" href="http://www.51aspx/CV/"+DataBinder.Eval (Container.DataItem,"procode")+".html\">"+ DataBinder.Eval(Container.DataItem,"proname")+"; </a>"%>
7.// ÐÞ¸ÄתÏò<%#" <A href=\"editpushpro.aspx?id="+DataBinder.Eval (Container.DataItem,"code")+"\">"+"ÐÞ¸Ä "+" </A>"%>
8.//µ¯ ³öÈ·¶¨°´Å¥Code<%#"<A id=\"btnDelete\" onclick=\"return confirm('ÄãÊÇ·ñ È·¶¨É¾³ýÕâÌõ¼Ç¼Âð?');\" href=\"pushproduct.aspx?dl="+DataBinder.Eval(Container.DataItem,"code") +"\">"+"ɾ³ý"+" </A>"%>
9.//Êä³öÊý¾Ý¸ñʽ»¯ "{0:F2}" ÊǸñʽ F2±íʾСÊýµãºóÊ£Á½Î»
<%# DataBinder.Eval(Container, "DataItem.PriceMoney","{0:F2} ") %>
10.//ÌáÈ¡¶¯Ì¬ÍøÒ³ÄÚÈÝUri uri = new Uri("http://www.cnblogs.com/
"); WebRequest req = WebRequest.Create(uri); WebResponse resp = req.GetResponse(); Stream str = resp.GetResponse
Ïà¹ØÎĵµ£º
Ê×ÏÈÏÈÖØÎÂһϹØÓÚb/sģʽµÄÕû¸öÇëÇó¹ý³Ì:
¿Í»§¶Ëͨ¹ýÔÚä¯ÀÀÆ÷µÄµØÖ·À¸ÇÃÈëµØÖ·À´·¢ËÍÇëÇóµ½·þÎñÆ÷¶Ë -> ·þÎñÆ÷½ÓÊÕµ½ÇëÇóÖ®ºó£¬·¢¸øÏàÓ¦µÄ·þÎñÆ÷¶ËÒ³Ã棨Ҳ¾ÍÊǽű¾£©À´Ö´ÐУ¬½Å±¾²úÉú¿Í»§¶ËµÄÏìÓ¦£¬·¢Ëͻؿͻ§¶Ë -> ¿Í»§¶Ëä¯ÀÀÆ÷½ÓÊÕµ½·þÎñÆ÷´«»ØµÄÏìÓ¦£¬¶ÔHtml½øÐ ......
1. ´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º
´«ËͲÎÊý£º
response.write("<script>window.open('*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"')</script>")
½ÓÊÕ²ÎÊý£º
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
2.Ϊ°´Å¥Ìí¼Ó¶Ô»°¿ò
Button1.Attribute ......
˵Ã÷: Ö´Ðе±Ç° Web ÇëÇóÆڼ䣬³öÏÖδ´¦ÀíµÄÒì³£¡£Çë¼ì²é¶ÑÕ»¸ú×ÙÐÅÏ¢£¬ÒÔÁ˽âÓйظôíÎóÒÔ¼°´úÂëÖе¼Ö´íÎóµÄ³ö´¦µÄÏêϸÐÅÏ¢¡£
Òì³£ÏêϸÐÅÏ¢: System.ArgumentException: ²»Ö§³Ö URI ¸ñʽ¡£
Ô´´íÎó:
ÐÐ 30: protected void BTNCLick(object sender, EventArgs e)
ÐÐ 31: {
ÐÐ 32: System.IO. ......
¿ÉÒÔʹÓà ISAPI ɸѡÆ÷ÔÚ IIS Web ·þÎñÆ÷¼¶±ðʵÏÖ URL ÖØд£¬Ò²¿ÉÒÔʹÓà HTTP Ä£¿é»ò HTTP ´¦Àí³ÌÐòÔÚ
ASP.NET ¼¶±ðʵÏÖ URL ÖØд¡£±¾ÎÄÖصã½éÉÜÈçºÎʹÓà ASP.NET ʵÏÖ URL ÖØд£¬Òò´ËÎÒÃǽ«²»¶ÔʹÓà ISAPI ɸѡÆ÷ʵÏÖ
URL ÖØдµÄϸ½Ú½øÐÐÉîÈë̽ÌÖ¡£µ«ÊÇ£¬ÓдóÁ¿µÄµÚÈý·½ ISAPI ɸѡÆ÷¿ÉÓÃÓÚ URL ÖØд£¬ÀýÈ磺 ......