asp.netʵÏÖÍøÒ³ÐÅÏ¢²É¼¯µÄ¼¸µã˼¿¼
×î½ü¹«Ë¾ÐèÒª¿ª·¢Ò»¸ö¼òÀúµ¼È빦ÄÜ£¬ÀàËÆ²©¿Í°á¼Ò»òÕßÓÊÏä°á¼Ò£¬Ö®Ç°×¥È¡ÐÅÏ¢ÊÇÀûÓû𳵲ɼ¯Æ÷£¬µ«ÊǼòÀúµ¼È빦ÄÜÐèÒªÓû§µÇ½ÒÔºó²ÅÄÜ»ñÈ¡¼òÀúÊý¾Ý£¬ÎÞÄÎÖ»ºÃ×Ô¼º¿ª·¢ÁË¡£
Ê×ÏÈÊÇÓöµ½µÄÎÊÌâÊÇ£ºÈçºÎʵÏÖÄ£ÄâµÇ½£¿
ÎÒÃÇÖªµÀÒ»°ãµÄÍøÕ¾¶¼ÊÇͨ¹ýCookiesÀ´Î¬»¤×´Ì¬µÄ£¬ÎÒ×¥µÄÍøÕ¾Ò²ÊÇÖ§³ÖÀûÓÃCookiesÀ´ÑéÖ¤Óû§µÄ£¬¹¹ÔìÒ»¸öpostÊý¾Ý°ü£¬Ïò·þÎñÆ÷Ìá½»Êý¾Ý£¬ÔÚÅäÖû𳵲ɼ¯Æ÷µÄʱºò£¬Ò²ÊÇÒªÏÈÀûÓÃWSockExpert.exe¹¤¾ß»ñµÃPostÊý¾Ý°ü£¬Ö®ºóÐÞ¸ÄÓû§ÃûºÍÃÜÂ룬Ïò·þÎñÆ÷Ìá½»µÄ¡£
Ìá½»Á˵ǽÊý¾Ýºó»¹Ã»Íê³ÉµÇ½£¬ËäÈ»·þÎñÆ÷»á·µ»ØµÇ½ºóµÄÒ³ÃæÊý¾Ý£¬µ«ÊÇÈç¹ûÔÚ½øÈëÆäËûµÄÁ´½ÓÒ³Ãæ£¬»¹ÊDz»ÔÊÐíµÄ£¬ÒòΪ·þÎñÆ÷ÿ´Î¶¼ÐèҪͨ¹ýÄãÌá½»¹ýÈ¥CookiesÀ´ÑéÖ¤ÄãÊÇ·ñµÇ½£¬ÔÚasp.netÀÀûÓÃCookies´æ´¢Éí·ÝÑé֤Ʊ֤£¬Ã¿´Î¶¼ÐèÒªÏò·þÎñÆ÷Ìá½»µÄ£¬³õѧasp.net×ÜÊÇŪ²»Ã÷ËüµÄformÑéÖ¤»úÖÆ£¬Ëü·â×°ÁËÌ«¶àÐÅÏ¢£¬ËäÈ»Óü¸ÐдúÂë¾ÍÄÜʵÏÖÑéÖ¤£¬ºóÀ´¿´ÁËЩweb¿ª·¢»ù´¡ÖªÊ¶²ÅŪÃ÷°×£¬ÔÚÕâ¸öÄãÐèÒª±£´æÉϴεǽºó·µ»ØµÄCookies£¬ÔÚÏ´ÎÓÐÆäËûÇëÇóʱ´øÉÏÕâ¸öCookies¾Í¿ÉÒÔÁË£¬Ôõô´øÉÏÄØ£¿ÏÂÃæÊÇÎÒÔÚ.netÀïµÄʵÏÖ£¬ºÜ¼òµ¥£¡
ÀûÓÃHttpWebRequestÀàµÄCookieContainerÀ´±£´æ£¬Õâ¸öCookieContainer»á±£´æ·þÎñÆ÷»Ø´«µÄCookies£¬µ«ÊÇǰÌáÊÇÄãÔÚ³õʼ»¯HttpWebRequestµÄʱºò£¬¼ÇµÃʵÀý»¯Õâ¸öCookieContainer£¬Ò»°ãµÄÇëÇó²»ÐèҪʵÀýËüµÄ£¬¼òµ¥µÄ´úÂëÈçÏ£º
httpWebRequest = (HttpWebRequest)HttpWebRequest.Create(URL);
httpWebRequest.CookieContainer = new CookieContainer();
httpWebRequest.ContentType = "application/x-www-form-urlencoded";
httpWebRequest.Method = "POST"
ΪÁËÄÜÈ«¾ÖʹÓÃÕâ¸öCookieContainer £¬Äã¿ÉÒÔ°ÑËü×÷Ϊȫ¾Ö±äÁ¿£¬ÕâÑùÔÚÏ´ÎrequestµÄʱºò½«Æä¸³¸øCookieContainer ÊôÐÔ¾ÍÐÐÁË¡£
ÏêϸÁ˽âCookieContainer ¼û£ºhttp://msdn.microsoft.com/zh-cn/vstudio/system.net.cookiecontainer(VS.80).aspx
ά»¤ÁËÕâ¸öCookieContainer ºó£¬ÎÒÃǾͿÉÒÔ·ÃÎʵǽºóµÄÒ³ÃæÁË£¬Ä£ÄâµÇ½ÎÊÌâ½â¾ö¡£
Æä´ÎÓöµ½µÄÎÊÌâ×ÔÈ»ÊÇ£ºÈç¹û´ÓÍøÒ³ÉÏ»ñµÃÏëÒªµÄÐÅÏ¢£¿
ÒªÔÚÍøÒ³×¥È¡ÐÅÏ¢£¬ÊµÏÖÆðÀ´×î¼òµ¥£¬Í¬Ê±Ò²ÊÇ×î·±ËöµÄ·½·¨£¬ÄǾÍÊÇÄ£°å·½·¨»ñÈ¡ÁË£¬´Ó»ð³µ²É¼¯Æ÷µÄÅäÖùý³Ì¿´³öÀ´£¬ËüÒ²¾ÍÊÇÓÃÕâÖÖ·½·¨¶øÒÑ£¬²»¹ýÈ˼ÒÄܰÑץȡÆ÷×ö³É³ÉÊìµÄ²úÆ·£¬²¢Ç
Ïà¹ØÎĵµ£º
Asp.net³£ÓõÄ51¸ö´úÂë(·Ç³£ÊµÓÃ)
1.//µ¯³ö¶Ô»°¿ò.µã»÷תÏòÖ¸¶¨Ò³Ãæ
CODE:Response.Write("<script>window.alert('¸Ã»áԱûÓÐÌá½»ÉêÇë,ÇëÖØÐÂÌá½»£¡')</script>");
Response.Write("<script>window.location ='http://www.51aspx.com/bizpulic/upmeb.aspx'</script>");
2. ......
---------------------------------------
Asp.Net,C#,SQL,JS,WCF,AJAX,¹¤×÷Á÷,WPF,MVC,LINQ,Éè¼ÆÄ£Ê½(¼Ü¹¹)µÈ¼¼ÊõÌÖÂÛ
“ASP.NET(C#)Fans” QQȺ£º96877690
---------------------------------------
²»¹ÜÊÇJ2SE¡¢J2EE»¹ÊÇJ2ME¾´Çë¼ÓÈ룡Eclipse¡¢NetBeans
Java½»Á÷QQ¸ß¼¶ÈºÀ©ÕУº96878255 ......
Page.ResponseÊôÐÔÖ»ÓÐÔÚÒ³Ãæ´úÂëÖУ¬»òÕß˵Ôڼ̳Ð×Ô: System.Web.UI.PageµÄÀàÖвÅÓС£ÆäËû¼´Ê¹using System.Web.UI Ò²ÎÞ·¨Ê¹ÓÃPage.ResponseÊôÐÔ¡£·ñÔò±àÒëʱ±¨´í£ºµ±Ç°ÉÏÏÂÎÄÖв»´æÔÚÃû³Æ"Response"
½â¾ö·½·¨£º¿ÉÒÔÓÃSystem.Web.HttpContext.Current.Res ......
È¥Äê×öÏîÄ¿µÄʱºò£¬·¢ÏÖÐèÒªÓÃÒ»¸öÀàËÆÓÚDevexpressµÄGridView¿Ø¼þ£¨http://demos.devexpress.com/ASPxGridViewDemos/MasterDetail/MasterDetail.aspx£©£¬Ò²¾ÍÊÇÏ൱ÓÚDataGrid/GridView¿Ø¼þµÄÒ»ÐмÓÉÏÒ»¸ö¿Õ°×ÐУ¬È»ºóÏÔʾDetailÐÅÏ¢¡£
ÓÚÊǺóÀ´¾ÍÏëµ½ÁËÏÂÃæµÄÒ»¸ö°ì·¨£º
& ......
ASP.NETÒ³ÃæÓëIISµ×²ã½»»¥ºÍ¹¤×÷ÔÀíÏê½â
µÚÒ»»Ø£º
ÒýÑÔ
ÎÒ²éÔĹý²»ÉÙAsp.NetµÄÊé¼®£¬·¢ÏÖ´ó¶àÊý×÷Õß¶¼ÊÇÕ¾ÔÚÒ»¸ö±È½Ï¸ßµÄ²ã´ÎÉϽ²½âAsp.Net¡£ËûÃÇÄÍÐÄ¡¢Ï¸ÖµظæËßÄãÈçºÎÒ»²½²½ÍϷſؼþ¡¢ÉèÖÿؼþÊôÐÔ¡¢±àдCodeBehind´úÂ룬ÒÔʵÏÖij¸öÌØ¶¨µÄ¹¦ÄÜ¡£
ÕâÖÖ×ö·¨£¬Êµ¼ÊÉÏÊǻشðÁË“ÈçºÎÈ¥×ö”µÄÎÊÌ⣬ȴà ......