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

ASP.NET


      ASP.NET ÅäÖÃÎļþ¹¦ÄÜÔÊÐíÄú´æ´¢¼òµ¥£¨±êÁ¿£©Öµ¡¢¼¯ºÏºÍÆäËû¸´ÔÓÀàÐÍ£¬ÒÔ¼°Óû§¶¨ÒåµÄÀàÐÍ¡£
 
1¡¢ÊôÐÔ¶¨ÒåÐÅÏ¢
ÔÚÅäÖÃÎļþÖж¨ÒåÊôÐÔʱ£¬Ó¦Ö¸¶¨½«ÓÃÓÚÒýÓøÃÊôÐÔµÄÃû³Æ¡£ÀýÈ磬Èç¹ûÒª´æ´¢ÓÊÕþ±àÂ룬Ôò¿ÉÒÔ½«ÊôÐÔÃüÃûΪ PostalCode£¬È»ºó¿ÉÒÔ»ñÈ¡ÊôÐÔÖµ²¢½«ÆäÉèÖÃΪ Profile.PostalCode¡£
¿ÉÒÔÑ¡ÔñΪ¸÷¸öÊôÐÔ¶¨ÒåÒÔϸ½¼ÓÌØÐÔ£º
·type   Ö¸¶¨ÊôÐÔµÄÀàÐÍ¡£Ä¬ÈÏΪ String¡£¿ÉÒÔ½«ÈκΠ.NET ÀàÖ¸¶¨ÎªÀàÐÍ£¨Int32¡¢DateTime¡¢StringCollection µÈ£©¡£Èç¹û .NET Framework ÖÐûÓж¨Òå¸ÃÀàÐÍ£¬Ôò±ØÐëÈ·±£ Web Ó¦ÓóÌÐò¿ÉÒÔ·ÃÎʸÃÀàÐÍ¡£¿ÉÒÔÔÚÍøÕ¾µÄ Bin Ŀ¼ÖлòÈ«¾Ö³ÌÐò¼¯»º´æ (GAC) Öаüº¬¸ÃÀàÐͱàÒëºóµÄ³ÌÐò¼¯£¬Ò²¿ÉÒÔ½«¸ÃÀàÐ͵ÄÔ´´úÂë·ÅÈëÍøÕ¾µÄ App_Code Ŀ¼ÖС£
·serializeAs   Ö¸¶¨ÐòÁл¯¸ñʽ»¯³ÌÐò£¨×Ö·û´®¡¢¶þ½øÖÆ¡¢XML »òÌṩ³ÌÐòÌض¨µÄÐòÁл¯£©¡£ÓйØÏêϸÐÅÏ¢£¬Çë²Î¼ûÐòÁл¯¡£Ä¬ÈÏÐòÁл¯Îª×Ö·û´®¡£
·allowAnonymous   Ö¸¶¨Ò»¸ö²¼¶ûÖµ£¬¸Ã²¼¶ûֵָʾÊÇ·ñΪÄäÃûÓû§ÍйÜÊôÐÔ¡£Ä¬ÈÏÇé¿öÏ£¬¸ÃÊôÐÔΪ false¡£Èç¹ûÏ£Íûδ¾­Éí·ÝÑéÖ¤µÄÓû§Ê¹ÓøÃÊôÐÔ£¬Ôò¿ÉÒÔ½«¸ÃÊôÐÔÉèÖÃΪ true¡£
·defaultValue   Ö¸¶¨ÊôÐÔ³õʼ»¯Ê±Ê¹ÓõÄÖµ¡£
·readOnly   Ö¸¶¨Ò»¸ö²¼¶ûÖµÀ´Ö¸Ê¾ÊôÐÔÊÇ·ñ¿ÉÐ޸ġ£
·provider   Ö¸¶¨Ìض¨ÓÚÊôÐÔµÄÌṩ³ÌÐò¡£Ä¬ÈÏÇé¿öÏ£¬Ê¹ÓÃΪÅäÖÃÎļþÊôÐÔÖ¸¶¨µÄĬÈÏÌṩ³ÌÐò¶ÔËùÓÐÊôÐÔ½øÐйÜÀí£¬µ«¸ö±ðÊôÐÔÒ²¿ÉÒÔʹÓò»Í¬µÄÌṩ³ÌÐò¡£
·customProviderData   Ö¸¶¨Ò»¸ö°üº¬×Ô¶¨ÒåÐÅÏ¢µÄ¿ÉÑ¡×Ö·û´®£¬¸Ã×Ö·û´®½«±»´«µÝ¸øÅäÖÃÎļþÌṩ³ÌÐò¡£¸÷¸öÌṩ³ÌÐò¿ÉʵÏÖ×Ô¶¨ÒåÂß¼­À´Ê¹ÓôËÊý¾Ý¡£
´ËÍ⣬¿ÉʹÓà group ÅäÖÃÔªËؽ«ÅäÖÃÎļþÊôÐÔ×é֯ΪÊôÐÔ×飬±¾Ö÷ÌâºóÃæµÄÄÚÈݽ«ÌÖÂÛ¸ÃÎÊÌâ¡£
 
2¡¢Ê¹ÓñêÁ¿Öµ
½«±êÁ¿Öµ£¨Èç×Ö·û´®¡¢Êý×ÖÖµ»ò DateTime Öµ£©´æ´¢ÔÚÅäÖÃÎļþÖнöÐèÒª×îСÅäÖᣱØÐëÌṩÃû³ÆºÍÀàÐÍ¡£¸ù¾Ý´æ´¢ÒªÇó£¬ÅäÖÃÎļþϵͳ»á½«Öµ´ÓÖ¸¶¨ÀàÐÍת»»Îª×Ö·û´®²¢×ª»»»ØÀ´¡£Í¨¹ý Profile ÊôÐÔ·ÃÎÊÊôÐÔʱ£¬ÒªÕýÈ·½øÐÐÀàÐÍ»¯¡£
ÀýÈ磬Èç¹ûÒª´æ´¢Óû§µÄÐÕÃû¡¢ÌåÖغͳöÉúÈÕÆÚ£¬Ôò¿ÉÒÔ¶¨ÒåÒ»¸öÃûΪ Name¡¢ÀàÐÍΪ String µÄÊôÐÔ£¬Ò»¸öÃûΪ Weight¡¢ÀàÐÍΪ Int32 µÄÊôÐÔ£¬ÒÔ¼°Ò»¸öÃûΪ BirthDate¡¢ÀàÐÍΪ DateTime µÄÊôÐÔ¡£ÔÚÅäÖÃÎļþÖУ¬ÊôÐÔ¶¨ÒåµÄÐÎʽÈçÏ£º
<profile d


Ïà¹ØÎĵµ£º

ASP.NET½Ì³Ì:µ÷ÓÃWebServiceµÄÔ´Âë


WebjxComÌáʾ£ºÕâÀïÒ»¶¨ÒªÌí¼ÓWEB ÒýÓò˵¥²½ÖèÈçÏÂproject->add web reference...£¬È»ºóÊäÈëÎÒÃÇWeb ServiceµÄ·¾¶£¬ÕâÀïÊÇhttp://localhost/WebService1/Service1.asmx£¬µã»÷Ìí¼Ó¾ÍOKÁË¡£ÕâʱÄ㽫ÔÚÀàÊÓͼÖп´µ½localhostÃüÃû¿Õ¼äÁË¡£
ÕâÀïÒ»¶¨ÒªÌí¼ÓWEB ÒýÓò˵¥²½ÖèÈçÏÂproject->add web reference...£¬È»ºóÊä ......

asp.net mvc json ÐòÁл¯À©Õ¹·½·¨

¼Ç¼һ¸öС·½·¨£¬ÈÃÈκζÔÏó¶¼ÊµÏÖjsonÐòÁкúµÄÀ©Õ¹·½·¨:
using System.Web.Script.Serialization;
...
 //
public static string ToJSON(this Object obj) {
            return new JavaScriptSerializer().Serialize(obj);
 }
... ......

asp.net·¢²¼ÍøÕ¾


ͨ³£²¿ÊôÍøÕ¾µÄʱºòÐèÒª±àÒëÄÇЩÐèÒªµÄÎļþ£¬ºÍһЩϵͳÐèÒªµÄ×é¼þ¡£
»á¸Ð¾õµ½ºÜ·±Ëö¡£
·¢²¼ÍøÕ¾ÊÇÒ»¸ö²»´íµÄÑ¡Ôñ:Ö±½Ó·¢²¼·þÎñÆ÷ÉÏ£¬ÉèÖúÃÕ¾µãÓë¶Ë¿Ú¼´¿É¡£ÒÔÏÂÊÇ×ܽáµÄ²½Öè¡£¡£¡£
µÚÒ»¡¢Êǽ«ÍøÕ¾ÀïËùÓеÄÊý¾ÝÁ¬½Ó¶¼×ö³É´Óweb.configÖжÁÈ¡£¬ÕâÑùµÄ»°£¬¾Í¿ÉÒÔÒ»ÀÍÓÀÒÝÁË¡£
µÚ¶þ¡¢¾ÍÊÇIISÉèÖÃÁË£¬ÔÚIISÖеÄasp.netÖÐ ......

ASP.NET


      ÊÓͼ״̬ÊÇ ASP.NET Ò³¿ò¼ÜÓÃÓÚÔÚÍù·µ¹ý³ÌÖ®¼ä±£ÁôÒ³ºÍ¿Ø¼þÖµµÄ·½·¨¡£ÔÚ³ÊÏÖÒ³µÄ HTML ±ê¼Çʱ£¬±ØÐëÔڻط¢¹ý³ÌÖб£ÁôµÄÒ³ºÍÖµµÄµ±Ç°×´Ì¬½«±»ÐòÁл¯Îª Base64 ±àÂë×Ö·û´®¡£È»ºó£¬´ËÐÅÏ¢½«±»·ÅÈëÒ»¸ö»ò¶à¸öÊÓͼ״̬Òþ²Ø×ֶΡ£
 
1¡¢·½°¸
ÊÓͼ״̬ÓÉ ASP.NET Ò³¿ò¼Ü×Ô¶¯ÓÃÓÚ±£´æÔÚ¸ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ