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

ASP.net Membership½ÇÉ«ÓëȨÏÞ¹ÜÀí(ת)

 
±¾ÎÄĿ¼£º
1.membership¼ò½é
2.membershipÔÚsql serverÖеÄÉèÖÃ
3.ÅäÖÃweb.config
4.´´½¨Óû§CreateUserWizard¿Ø¼þ
5.Óû§µÇ¼login¿Ø¼þ
6.ÏÔʾµ±Ç°Óû§µÄÃû³ÆLoginName¿Ø¼þ
7.¼ì²âÓû§µÄÉí·ÝÑé֤״̬µÄLoginStatus¿Ø¼þ
8.Ϊ²»Í¬Àà±ðÓû§³ÊÏÖ²»Í¬ÄÚÈݵÄLoginView¿Ø¼þ
9.¸ü¸ÄÃÜÂëµÄChangePassword¿Ø¼þ
10.×ÔÖúÕÒ»ØÃÜÂëµÄPasswordRecovery¿Ø¼þ
11.×ܽá
1.membership¼ò½é
membership£¬ÕæµÄºÜÓÐȤ£¬ºÜ·½±ã£¬ºÜÓÐÓ᣽éÉܸø´ó¼Ò¡£
ÔÚ ASP.NET Ó¦ÓóÌÐòÖУ¬Membership ÀàÓÃÓÚÑéÖ¤Óû§Æ¾¾Ý²¢¹ÜÀíÓû§ÉèÖã¨ÈçÃÜÂëºÍµç×ÓÓʼþµØÖ·£©¡£Membership
Àà¿ÉÒÔ¶À×ÔʹÓ㬻òÕßÓë FormsAuthentication Ò»ÆðʹÓã¬ÒÔ´´½¨Ò»¸öÍêÕûµÄ Web
Ó¦ÓóÌÐò»òÍøÕ¾µÄÓû§Éí·ÝÑé֤ϵͳ¡£Login ¿Ø¼þ·â×°ÁË Membership À࣬´Ó¶øÌṩһÖÖ±ã½ÝµÄÓû§ÑéÖ¤»úÖÆ¡£
Membership ÀàÌṩµÄ¹¦ÄÜ¿ÉÓÃÓÚ£º
1)´´½¨ÐÂÓû§¡£
2)½«³ÉÔ±×ʸñÐÅÏ¢£¨Óû§Ãû¡¢ÃÜÂë¡¢µç×ÓÓʼþµØÖ·¼°Ö§³ÖÊý¾Ý£©´æ´¢ÔÚ Microsoft SQL Server »òÆäËûÀàËƵÄÊý¾Ý´æ´¢Çø¡£
3)¶Ô·ÃÎÊÍøÕ¾µÄÓû§½øÐÐÉí·ÝÑéÖ¤¡£¿ÉÒÔÒÔ±à³Ì·½Ê½¶ÔÓû§½øÐÐÉí·ÝÑéÖ¤£¬Ò²¿ÉÒÔʹÓà Login ¿Ø¼þ´´½¨Ò»¸öÖ»ÐèºÜÉÙ´úÂë»òÎÞÐè´úÂëµÄÍêÕûµÄÉí·ÝÑé֤ϵͳ¡£
4)¹ÜÀíÃÜÂë¡£°üÀ¨´´½¨¡¢¸ü¸Ä¡¢¼ìË÷ºÍÖØÖÃÃÜÂëµÈµÈ¡£¿ÉÒÔÑ¡ÔñÅäÖà ASP.NET ³ÉÔ±×ʸñÒÔÒªÇóÒ»¸öÃÜÂëÌáʾÎÊÌâ¼°Æä´ð°¸À´¶ÔÍü¼ÇÃÜÂëµÄÓû§µÄÃÜÂëÖØÖúͼìË÷ÇëÇó½øÐÐÉí·ÝÑéÖ¤¡£
ĬÈÏÇé¿öÏ£¬ASP.NET ³ÉÔ±×ʸñ¿ÉÖ§³ÖËùÓÐ ASP.NET Ó¦ÓóÌÐò¡£Ä¬ÈϳÉÔ±×ʸñÌṩ³ÌÐòΪ SqlMembershipProvider
²¢ÔÚ¼ÆËã»úÅäÖÃÖÐÒÔÃû³Æ AspNetSqlProvider Ö¸¶¨¡£SqlMembershipProvider µÄĬÈÏʵÀýÅäÖÃΪÁ¬½Óµ½
Microsoft SQL Server µÄÒ»¸ö±¾µØʵÀý¡£
2.membershipÔÚsql serverÖеÄÉèÖÃ
ҪʹÓÃmembership£¬ÐèÒª¶ÔÊý¾Ý¿â½øÐÐһЩÉèÖã¬Ê¹ÓùýmembershipµÄÅóÓÑÖªµÀ£¬Êý¾Ý¿âÖÐÓÐһЩ¹ÌÓÐµÄ±í¡¢ÊÓͼºÍ´æ´¢¹ý³Ì£¬ÎÒÃÇ×Ô
¼ºµÄ±íÖÐûÓÐÕâЩ¶«Î÷¡£²»¹ý£¬ÎÒÃÇ¿ÉÒÔͨ¹ýÏòµ¼À´´´½¨ËüÃÇ£¬ÄǾÍÊÇaspnet_regsql.exe£¬Ò»°ãÀ´ËµËüλÓÚ£ºC:\WINDOWS
\Microsoft.NET\Framework\v2.0.50727£¨ÎҵľÍÔÚÕâÀ
Ëü¼È¿ÉÒÔ´´½¨Êý¾Ý¿âÖеÄÑ¡ÏҲ¿ÉÒÔÒƳýÕâЩÉèÖá£
ÔÚÔËÐÐÕâ¸ö³ÌÐò֮ǰ£¬ÎÒÔÚsql server2005Öн¨Á¢ÁËÒ»¸ö¿ÕµÄÊý¾Ý¿â£ºmembershipdemo¡£½¨Á¢membershipdemoºó£¬ÎÒÃÇÔËÐÐaspnet_regsql.exe£¬Ö¸¶¨membershipΪmembershipdemo¡£
Íê³ÉÖ®ºó£¬¿Õ¿ÕµÄÊý¾Ý¿â¾ÍÓкܶàÄÚÈÝÁË£¬²»¹ý¾ßÌåµÄÄÚÈÝÔÝʱ²»±Ø¹Ü¡£¼ÌÐøºóÃæµÄÄÚÈÝ¡


Ïà¹ØÎĵµ£º

ASP.NETÖдæȡͼƬµ½Êý¾Ý¿âµÄʾÀý

//¿ª·¢»·¾³£ºWindow 2000¡¢SQLServer2000¡¢.Net Framework SDKÕýʽ°æ
//¿ª·¢ÓïÑÔ£ºC#¡¢ASP.Net
//¼ò½é£ºÊý¾Ý¿âÖÐͼƬ´æÐî¼°¶ÁÈ¡
//×÷Õߣºengine
/*
˵Ã÷£ºÔÚASPÖУ¬ÎÒÃÇÓÃRequest.TotalBytes¡¢Request.BinaryRead()À´ÉÏ´«Í¼Æ¬£¬Õâ¸ö¿É¶ñµÄBinaryRead()·½·¨·Ç³£±¿£¬µ¥¸öÎļþÉÏ´«µ¹Ã»Ê²Ã´´óÊ£¬µ¥Èç¹û¶à¸öͼƬÉÏר¿É¾Í»¨ ......

̸ASP.NETÖд°ÌåµÄÆ®¶¯

 ±¾Îĺʹó¼Ò·ÖÏíµÄÊÇ.NETÖд°ÌåµÄÆ®¶¯¡£Ï£Íû¶Ô´ó¼ÒÓÐËù°ïÖú°É¡£
   ÓÃ.NETÖÆ×÷Æ®¶¯µÄ´°Ìåʱ£¬ÐèҪʹÓÃTimer¿Ø¼þ¡£Ê×ÏÈ£¬µ±´°Ìå¼ÓÔØʱÉ趨һ¸ö³õʼλÖã¬È»ºóÔÚ´°ÌåÖж¨ÒåÁ½¸öTimer¿Ø¼þ£¬ÆäÖÐtimer1ÓÃÀ´¿ØÖÆ´°Ìå´Ó×óÏòÓÒÆ®¶¯£¬timer2¿ØÖÆ´°Ìå´ÓÓÒÏò×óÆ®¶¯£¬µ±timer1Æô¶¯ºó£¬Ã¿¸ô0.01s£¬¶¼»áÔÚ´¥·¢µÄʼþÖиø ......

ASP.NETÑéÖ¤¿Ø¼þÏê½â

 
ASP.NET
¹«ÓÐÁùÖÖÑéÖ¤¿Ø¼þ£¬·Ö±ðÈçÏ£º
 
RequiredFieldValidator
£¨±ØÐë×Ö¶ÎÑéÖ¤£© ÓÃÓÚ¼ì²éÊÇ·ñÓÐÊäÈëÖµ
CompareValidator
£¨±È½ÏÑéÖ¤£© °´É趨±È½ÏÁ½¸öÊäÈë
RangeValidator
£¨·¶Î§ÑéÖ¤£© ÊäÈëÊÇ·ñÔÚÖ¸¶¨·¶Î§
RegularExpressionValidator
£¨ÕýÔò±í´ïʽÑéÖ¤£© ÕýÔò±í´ïʽÑéÖ¤¿Ø¼þ
CustomValid ......

ASP.NETµÄʵÓôúÂë

1. ´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º

´«ËͲÎÊý£º
response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>")
½ÓÊÕ²ÎÊý£º
string a = Request.QueryString("id");
string b = Request.QueryStrin ......

Asp.Netǰ̨µ÷Óúǫ́±äÁ¿

Asp.NetÖм¸ÖÖÏàËƵıê¼Ç·ûºÅ: < %=...%>< %#... %>< % %>< %@ %>½âÊͼ°Ó÷¨
´ð: < %#... %>: ÊÇÔڰ󶨿ؼþDataBind()·½·¨Ö´ÐÐʱ±»Ö´ÐУ¬ÓÃÓÚÊý¾Ý°ó¶¨
Èç: < %# Container.DataItem("tit") %>
< %= %>: ÔÚ³ÌÐòÖ´ÐÐʱ±»µ÷Ó㬿ÉÒÔÏÔʾºǫ́±äÁ¿Öµ
Èç:
*.aspxÖУº & ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ