ASP.NETÅäÖÃÎļþWeb.config Ïêϸ½âÊÍ
Ò»¡¢ÈÏʶWeb.configÎļþ
¡¡¡¡Web.configÎļþÊÇÒ»¸öXMLÎı¾Îļþ£¬ËüÓÃÀ´´¢´æ ASP.NET Web Ó¦ÓóÌÐòµÄÅäÖÃÐÅÏ¢£¨Èç×î³£ÓõÄÉèÖÃASP.NET Web Ó¦ÓóÌÐòµÄÉí·ÝÑéÖ¤·½Ê½£©£¬Ëü¿ÉÒÔ³öÏÖÔÚÓ¦ÓóÌÐòµÄÿһ¸öĿ¼ÖС£µ±Äãͨ¹ýVB.NETн¨Ò»¸öWebÓ¦ÓóÌÐòºó£¬Ä¬ÈÏÇé¿öÏ»áÔÚ¸ùĿ¼×Ô¶¯´´½¨Ò»¸öĬÈϵÄ
Web.configÎļþ£¬°üÀ¨Ä¬ÈϵÄÅäÖÃÉèÖã¬ËùÓеÄ×ÓĿ¼¶¼¼Ì³ÐËüµÄÅäÖÃÉèÖá£Èç¹ûÄãÏëÐÞ¸Ä×ÓĿ¼µÄÅäÖÃÉèÖã¬Äã¿ÉÒÔÔÚ¸Ã×ÓĿ¼ÏÂн¨Ò»¸öWeb.configÎļþ¡£Ëü¿ÉÒÔÌṩ³ý´Ó¸¸Ä¿Â¼¼Ì³ÐµÄÅäÖÃÐÅÏ¢ÒÔÍâµÄÅäÖÃÐÅÏ¢£¬Ò²¿ÉÒÔÖØд»òÐ޸ĸ¸Ä¿Â¼Öж¨ÒåµÄÉèÖá£
¡¡¡¡ÔÚÔËÐÐʱ¶ÔWeb.configÎļþµÄÐ޸IJ»ÐèÒªÖØÆô·þÎñ¾Í¿ÉÒÔÉúЧ£¨×¢£º<processModel> ½ÚÀýÍ⣩¡£µ±È»Web.configÎļþÊÇ¿ÉÒÔÀ©Õ¹µÄ¡£Äã¿ÉÒÔ×Ô¶¨ÒåÐÂÅäÖòÎÊý²¢±àдÅäÖýڴ¦Àí³ÌÐòÒÔ¶ÔËüÃǽøÐд¦Àí¡£
¡¡¡¡¶þ¡¢web.configÅäÖÃÎļþ£¨Ä¬ÈϵÄÅäÖÃÉèÖã©ÒÔÏÂËùÓеĴúÂ붼Ӧ¸ÃλÓÚ
<configuration>
<system.web>
¡¡¡¡ºÍ
</system.web>
</configuration>
¡¡¡¡Ö®¼ä£¬³öÓÚѧϰµÄÄ¿µÄÏÂÃæµÄʾÀý¶¼Ê¡ÂÔÁËÕâ¶ÎXML±ê¼Ç
¡¡¡¡1¡¢<authentication> ½Ú
¡¡¡¡×÷ÓãºÅäÖà ASP.NET Éí·ÝÑéÖ¤Ö§³Ö£¨ÎªWindows¡¢Forms¡¢PassPort¡¢NoneËÄÖÖ£©¡£¸ÃÔªËØÖ»ÄÜÔÚ¼ÆËã»ú¡¢Õ¾µã»òÓ¦ÓóÌÐò¼¶±ðÉùÃ÷¡£<authentication> ÔªËرØÐèÓë<authorization> ½ÚÅäºÏʹÓá£
¡¡¡¡Ê¾Àý£º
¡¡¡¡ÒÔÏÂʾÀýΪ»ùÓÚ´°Ì壨Forms£©µÄÉí·ÝÑéÖ¤ÅäÖÃÕ¾µã£¬µ±Ã»ÓеǽµÄÓû§·ÃÎÊÐèÒªÉí·ÝÑéÖ¤µÄÍøÒ³£¬ÍøÒ³×Ô¶¯Ìøתµ½µÇ½ÍøÒ³¡£
[¸´ÖƵ½¼ôÌù°å]
CODE:
<authentication mode="Forms" >
<forms loginUrl="logon.aspx" name=".FormsAuthCookie"/>
</authentication>
ÆäÖÐÔªËØloginUrl±íʾµÇ½ÍøÒ³µÄÃû³Æ£¬name±íʾCookieÃû³Æ
¡¡¡¡2¡¢<authorization> ½Ú
¡¡¡¡×÷Ó㺿ØÖÆ¶Ô URL ×ÊÔ´µÄ¿Í»§¶Ë·ÃÎÊ£¨ÈçÔÊÐíÄäÃûÓû§·ÃÎÊ£©¡£´ËÔªËØ¿ÉÒÔÔÚÈκμ¶±ð£¨¼ÆËã»ú¡¢Õ¾µã¡¢Ó¦ÓóÌÐò¡¢×ÓĿ¼»òÒ³£©ÉÏÉùÃ÷¡£±ØÐèÓë<authentication> ½ÚÅäºÏʹÓá£
¡¡¡¡Ê¾Àý£ºÒÔÏÂʾÀý½ûÖ¹ÄäÃûÓû
Ïà¹ØÎĵµ£º
suggest.jsÎļþ£¨ÔÚÒýÈësuggest.jsÎļþÇ°ÐèÒªÏÈÒýÈëjquery-1.4.2.min.js£©£º
$(function() {
var k = -1;
//¸ø²éѯÎı¾¿ò°ó¶¨click keyupʼþ£¬½øÐÐÕâÁ½¸öʼþ£¬×Ô¶¯²éѯÊý¾Ý
$("#FrmChangshang").bind('click keyup', function(event) {
//»ñÈ¡¼üÅ̲Ù×÷ʼþ´úÂë
var keyc = event ......
ËÑË÷ÒýÇæÓÅ»¯¶ÔÈκÎÃæÏò¹«ÖÚµÄÍøÕ¾À´Ëµ¶¼·Ç³£ÖØÒª£¬ASP.net 4.0 Ϊ´Ë¾Í×öÁË´óÁ¿¸ÄÔì¡£ÕâЩ¸Ä½ø°üÀ¨ÈçÏ£º 301ÓÀ¾ÃÐÔÖض¨Ïò Ëæ×Åʱ¼äµÄǨÒÆ£¬ÍøÕ¾µÄһЩҳÃæµØÖ·»á·¢Éú±ä»¯£¬Õâ»áµ¼ÖÂËÑË÷ÒýÇæÊÕ¼µÄÁ´½ÓµØÖ·¡¢Óû§ÊղصĵØַʧЧ¡£Response.Redirect() ¾ÍÊǽâ¾öÕâ¸öÎÊÌâµÄ¡£µ«ÊÇResponse.Redirect ÓÐÒÔÏÂÎÊÌ⣺ Response. ......
ÔÚÒ»¸öСÐÍÏîÄ¿ÖУ¬ÎÒʹÓÃÁËAjax ExtensionsÖеÄUpdatePanel¿Ø¼þ£¬ÔÚ±¾µØµ÷ÊÔÔËÐÐʱºÃµÄ£¬¿ÉÒÔ¿´µ½ajaxµÄÒ첽ˢÐÂЧ¹û£¬µ«Êǵ±·¢²¼µ½°²×°ÁË.net framework 3.5 sp1µÄserver 2003ÉÏÈ¥Ö®ºó£¬·¢ÏÖajaxЧ¹ûûÓÐÁË£¬Ò²¾ÍÊÇ˵±¾À´µÄÒì²½Ìá½»±ä³ÉÁË·ÇAjax·½Ê½µÄPOST£¬¶øÇÒûÓб¨¸æÈκδíÎó¡£
¶Ô±È¿ª·¢Ê±ºÍÔËÐÐ ......