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

ÀûÓÃASP.NET¿ò¼ÜÖÆ×÷»ùÓÚ½ÇÉ«µÄ°²È«µÇ½

ÎÒ¿´ÁËÓкܶàÅóÓѶ¼ÔÚ³¢ÊÔд³ö´øÓеǽÕâÑù¹¦ÄܵÄÍøÕ¾£¬Æä·½·¨¼¸ºõ¶¼ÊÇÑéÖ¤Óû§µÄµÇ½ºÏ·¨£¬È»ºó·¢ËÍÒ»¸ö±íʾÑéÖ¤µÄCookie£¬»òÕßÔÚSessionÖб£´æÐÅÏ¢ÒÔ±ãÓÚ×·×Ù½ÓÏÂÀ´µÄ·ÃÎÊÊÚȨ£¬Æäʵ£¬ÕâЩϸ½Ú»¯µÄ²Ù×÷£¬.NET¶¼ÌṩÁËÒ»Öַdz£ÓÐЧµÄ½â¾ö°ì·¨£¬ÄÜʹÄã´Ó·±ËöµÄ°²È«ÑéÖ¤ÉϽâÍѳöÀ´£¬¶øÇÒ£¬¾¡¹ÜÄã¿ÉÄܺÜСÐĵض¨ÒåÄÇЩҳÃæ²»Äܱ»Ã»ÓÐȨÏÞµÄÈË·ÃÎÊ£¬È»¶ø»¹ÓпÉÄܳöÏÖһЩÎÞ·¨±»¼ì²é³öÀ´µÄ©¶´ÈÃËûÃÇÌø¹ý°²È«ÑéÖ¤
ºÃ£¬·Ï»°ÉÙ˵£¬±¾ÎĽ«½éÉÜÈçÏÂÄÚÈÝ£º
1¡¢¹ØÓڵǽÑéÖ¤ºÍÊÚȨ
2¡¢Ê¹ÓÃFormsÑé֤ģʽ
3¡¢ÊÚȨ×ÊÔ´µÄ·ÃÎÊ
4¡¢»ùÓÚ½ÇÉ«µÄÊÚȨ
1¡¢¹ØÓڵǽÑéÖ¤ºÍÊÚȨ
ºÜ¶àÍøÕ¾¶¼Óеǽ¶Ô»°¿ò£¬ÈÃÊÂÏÈÒѾ­×¢²áµÄÓû§ÑéÖ¤£¬ÒÔ±ãΪËûÃÇÌṩ¸öÐÔ»¯µÄ·þÎñµÈ¡£¿ÉÒÔ°ÑÕâ¸ö¹ý³Ì¿´×÷ÊÇÁ½¼þÊÂÇéµÄ·¢Éú£ºÑéÖ¤ºÍÊÚȨ£¡µÇ½µÄ×÷ÓÃÊÇÑéÖ¤ÇëÇóµÇ½µÄÓû§ÊÇ·ñºÏ·¨£¬¶øÊÚȨÔòÊÇÑéÖ¤ºÏ·¨µÄÓû§ÔÚÇëÇó×ÊԴʱ£¬¸ù¾ÝËûÃǵÄȨÏÞ¾ö¶¨ÊÇ·ÃÎÊ»¹ÊǾܾø¡£
ÒÔÉÏÕâÖÖÍøÕ¾±¾ÉíÌṩ¶Ô»°¿òµÄ×÷·¨ÔÚ.NETÖб»³Æ֮ΪFormsÑé֤ģʽ£¬½ÓÏÂÀ´½«»á½²ÊöÕâÖÖÑé֤ģʽ¡£ÔÚÒÔÇ°ASP³ÂÐòÔ±»òÕßÆäËû³ÌÐòÔ±£¬ÒªÏë±£´æºÏ·¨Óû§µÄÑéÖ¤£¬ÔÚÒÔºóµÄ·ÃÎÊÊÚȨÖÐʹÓ㬲»µÃ²»Ê¹ÓÃдCookie»òÕß½«ÐÅÏ¢±£´æÔÚSessionÖеķ½·¨£¬¶øÔÚÐèÒªÊÚȨµÄÒ³Ãæ¼ÓÔØÇ°Ìí¼ÓÒ»¶Ñ·±ËöµÄ´úÂëÀ´ÑéÖ¤Öƶ¨µÄÓû§ÊÇ·ñ¾ßÓзÃÎÊȨÏÞ·ñÔòµÄ»°¾Í²»ÄÜÏÔʾҳÃæµÄÄÚÈÝ£¬×îÄÕ»ðµÄÊÇÔÚÊÚȨҳÃæÉÏÌí¼ÓÕâЩ´úÂëÈÃÈ˾õµÃÖظ´ºÍ·±Ëö£¬¶øÇÒ¿ÉÄܲ»ÊÇ×ȫµÄ£¬ÓÐһЩ±È½ÏÒþ±ÎµÄ·½Ê½¿ÉÄÜ»áÇáÒ×ÈƹýÕâÖÖÑéÖ¤£¬Òò´Ë³ÌÐòÔ±½«À´Òª×öµÄºÜ¶àÊÂÇé¾ÍÊÇÔÙÐ޸ĴúÂëÒѶÂסÔÚÔËÐйý³ÌÖвŷ¢Ïֵĩ¶´¡£ÔÚ.NETµÄSystem.Web.SecurityÖÐÌṩÁËһЩÍøÕ¾°²È«·½ÃæµÄ½â¾ö·½°¸£¬¾¡¹ÜÑéÖ¤Óû§ºÏ·¨ºÍÊÚȨµÄ»ù±¾Ë¼Â·Ã»Óб仯£¬µ«ÊÇÊÚȨµÄ¹¤×÷¼¸ºõÒѾ­½»¸ø.NET¿ò¼ÜÁË£¬ÎÒÃÇЩ´úÂëÖ®ÐèÒª×Ô¼ºÑéÖ¤Óû§ºÏ·¨£¬²¢ÇÒ¸æËß¿ò¼ÜÕâ¸öÓû§ºÏ·¨¼´¿É¡£
2¡¢Ê¹ÓÃFormsÑé֤ģʽ
ҪʹÓÃÆôÓÃFormsÑé֤ģʽ£¬ÇëÔÚÍøÕ¾¸ùĿ¼ÏµÄweb.configÎļþÖÐÌí¼ÓÈçÏÂÅäÖ㺣¨×¢ÒâÇø·Ö´óСд£©
³ÌÐò´úÂ룺
<configuration>
<system.web>
<authentication mode="Forms" />
</system.web>
</configuration>
Õ⽫¸æËß.NET£¬ÄãµÄÍøվʹÓÃFormsÑé֤ģʽ£¬.NET½«²»²ÎÓëÑéÖ¤Óû§µÄ¹¤×÷£¬¶øÊǽ«Õâ¸ö¹¤×÷½»¸øÄãÍê³É£¬Äã±ØÐë×Ô¼º±àдһЩ´úÂëÀ´ÑéÖ¤Óû§ºÏ·¨£¬²¢ÇÒ±¨¸æ¸ø.NETÓû§ÊǺϷ¨µÄ¡£.NET½«»á·¢ËÍÒ»¸öÑéÖ¤Cookieµ½Óû§£¬ËæºóµÄ·ÃÎÊÖУ¬.NETÒÔ´ËCookieΪÒÀ¾Ý£¬À´Ö´ÐÐÊÚȨµÄ²Ù×÷¡£
Àý


Ïà¹ØÎĵµ£º

ASP.NET ASP.NET ·þÎñÆ÷¿Ø¼þµÄÑéÖ¤´íÎóÐÅÏ¢²¼¾Ö


      µ±´íÎóÐÅÏ¢³öÏÖÔÚÒ³ÉÏʱ£¬Ëü³ÉΪҳ²¼¾ÖµÄÒ»²¿·Ö¡£ÄúÐèÒªÉè¼ÆÒ³µÄ²¼¾ÖÒÔ·ÅÖÿÉÄܳöÏÖµÄÈκδíÎóÎı¾¡£
Èç¹ûÑéÖ¤ÔÚ·þÎñÆ÷ÉÏÖ´ÐУ¬Ôò³ý·Ç³öÏÖ´íÎ󣬷ñÔòÑéÖ¤¿Ø¼þ²»»á³ÊÏÖµ½Ò³£¬²¢Òò´Ë²»»áÕ¼ÓÃÈκοռ䡣Èç¹û³öÏÖ´íÎó£¬Ò³½«ÔÚÍù·µÆÚ¼äÖØд´½¨£¬²¢½«´íÎóÎı¾Ìí¼Óµ½Ò³¡£
Èç¹ûÓû§¾ßÓÐÖ§³Ö¶¯Ì ......

ASP.NET ÑÝÁ·£ºÒÔ±à³Ì·½Ê½¿ØÖÆ ASP.NET ²Ëµ¥


±¾ÑÝÁ·Í¨¹ýʹÓôúÂëЭµ÷ͬһҳÉϵÄÁ½¸ö²Ëµ¥£¬ÑÝʾÈçºÎÒÔ±à³Ì·½Ê½Ê¹Óà ASP.NET Menu ¿Ø¼þ¡£
¿ÉÒÔʹÓà ASP.NET Menu ¿Ø¼þΪÍøÕ¾´´½¨µ¼º½²Ëµ¥¡£ÔÚ±¾ÑÝÁ·ÖУ¬½«¿¼²ì ASP.NET Menu ¿Ø¼þµÄ±à³Ì·½Ã棬²¢´´½¨Á½¸öЭͬ¹¤×÷µÄ²Ëµ¥£¬ËüÃǶ¼°ó¶¨µ½Í¬Ò»¸ö Web.sitemap Îļþ¡£µÚÒ»¸ö²Ëµ¥ÊǾ²Ì¬ÏÔʾµÄÀà±ð£¨Èç²úÆ·¡¢·þÎñºÍÖ§³Ö£©²Ëµ¥¡£Ë ......

asp.netÁ¬½Ósql

µ÷ÓÃÊý¾ÝÁ¬½ÓÁ½ÖÖ·½·¨
1.web.config £¨ÅäÖÃÎļþ£© ÖÐ
<appSettings>
<add key="ConnectionString" value="server=localhost\sqlexpress;uid=sa;pwd=123456;database=News"/>
</appSettings>
µ÷ÓõÄʱºò
string strConn = System.Configuration.ConfigurationManager.AppSettings["ConnectionString ......

ASP.NETÒ³Ãæˢз½·¨×ܽá


 ASP.NETÒ³Ãæˢз½·¨×ܽá
ÏÈ¿´¿´ASP.NETÒ³ÃæˢеÄʵÏÖ·½·¨£º
µÚÒ»£º
private void Button1_Click( object sender, System.EventArgs e ) { Response.Redirect( Request.Url.ToString( ) ); } µÚ¶þ£º
private void Button2_Click( object sender, System.EventArgs e ) { Response.Write( " < script lang ......

ÓÃASP.NET/C#Á¬½ÓAccessºÍSQL ServerÊý¾Ý¿â

Á¬½ÓAccess
Ê×ÏÈ¿´Ò»¸öÀý×Ó´úÂëƬ¶Ï:
³ÌÐò´úÂë:
--------------------------------------------------------------------------------
using System.Data;
using System.Data.OleDb;
......
string strConnection="Provider=Microsoft.Jet.OleDb.4.0;";
strConnection+=@"Data Source=C:\BegASPNET\Northwind.mdb" ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ