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

¶¨ÒåºÍʹÓÃASP.NET Profile(¸½Àý)

1¡¢Ë«»÷Ò»¸öÊý¾ÝÔ´¿Ø¼þ£¬½«Òª´æ´¢profileµÄÊý¾Ý¿â×÷ΪÊý¾ÝÔ´¼ÓÈë¿Ø¼þ£¨Õâ¸ö²½ÖèûʲôÓã¬Ö»ÊÇΪÁË·½±ã´ó¼ÒÓÿؼþ½¨Á¢Á¬½Ó£¬ÕâÑù²»ÈÝÒ׳ö´í£©£¬½¨Á¢ºÃÖ®ºó½«designÒ³ÃæµÄÊý¾ÝÔ´¿Ø¼þɾ³ý£¬Äã»á·¢ÏÖÔÚweb.configÀﻹÊÇÓÐÒ»ÌõÁ¬½ÓÓï¾ä£¬²»ÒªÉ¾³ý£¬ÎÒÃÇÏÂÃæ½«Óõ½Ëü£¬È磺 <connectionStrings>
  <add name="aspnetdbConnectionString" connectionString="Data Source=JAMESSHENG;Initial Catalog=aspnetdb;Integrated Security=True" providerName="System.Data.SqlClient"/>
 </connectionStrings>
2¡¢¶¨ÒåProfile,ÔÚÔ´ÂëÖмÓÈë
  <profile enabled="true" automaticSaveEnabled="true" defaultProvider="SqlProvider">
   <providers>
    <clear/>
    <add name="sqlProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="aspnetdbConnectionString" applicationName="ProfileSample" description="Sample for asp.net Profile and Profile Service"/>
   </providers>
   <properties>
    <add name="BackGroudColor" type="System.String" allowAnonymous="true"/>
   </properties>
  </profile>
  <anonymousIdentification enabled="true"/>
//defaultproviderÖ¸¶¨Ä¬ÈÏÅäÖÃÎļþÌṩ³ÌÐòµÄÃû³Æ 
   automaticSaveEnabledÖ¸¶¨Óû§ÅäÖÃÎļþÊÇ·ñÔÚ ASP.NET Ò³Ö´ÐнáÊøÊ±×Ô¶¯±£´æ¡£Èç¹ûΪtrue£¬ÔòÓû§ÅäÖÃÎļþÔÚ ASP.NET Ò³Ö´ÐнáÊøÊ±×Ô¶¯±£´æ¡£
   providers(¿ÉÑ¡ÔªËØ)¶¨ÒåÅäÖÃÎļþÌṩ³ÌÐòµÄ¼¯ºÏ,Ëüµ±Öаüº¬<add> :name = defaultProviderµÄÖµ;type = System.Web.Profile.SqlProfileProviderÊÇʹÓÃsql;connectionStringName = aspnetdbConnectionStringʹÓÃÉÏÃæÁ¬½ÓÖж¨ÒåµÄÁ¬½Ó×Ö·û´®;
properties(±ØÑ¡µÄÔªËØ)¶¨ÒåÓû§ÅäÖÃÎļþÊôÐÔºÍÊôÐÔ×éµÄ¼¯ºÏ,Ëüµ±Öаüº¬<add>:name=“BackGroudColor”¶¨ÒåProfileÖеÄÊôÐÔÃû³Æ;type="System.String"×Ö·û´®ÀàÐÍ;allowAnonymous="true"¶¨ÒåÊÇ·ñ±£´æÄäÃûÓû§ÅäÖÃ,Èç¹ûÔÚ´Ë´¦¶¨Òåtrue£¬ÔòÔÚºóÃæ±ØÐë¼ÓÈë<anonymousIdentification>ÅäÖÃ,Éè


Ïà¹ØÎĵµ£º

ASP.NETÖÐCookieµÄ²Ù×÷

ÔÚѧϰ¹ý³ÌÖÐÐèÒªÓõ½CookieÎļþ£¬ÔÚÍøÉÏÕÒÁËЩÏà¹ØµÄ֪ʶ£¬Ñ§Ï°ÁËÒ»²¿·Ö£¬ÏּǼÈçÏ£º
£¨1£©
HttpCookie myHttpCookie = new HttpCookie("MyWebSite");
DateTime myDateTime = System.DateTime.Now;
TimeSpan myTimeSpan = new TimeSpan();
if (rbHour.Checked == true)
{
    myTimeSpan = new Ti ......

ASP.NET¿ì½Ý¼ü

CTRL + SHIFT + BÉú³É½â¾ö·½°¸
CTRL + F7 Éú³É±àÒë
CTRL + O ´ò¿ªÎļþ
CTRL + SHIFT + O´ò¿ªÏîÄ¿
CTRL + SHIFT + CÏÔʾÀàÊÓͼ´°¿Ú
F4 ÏÔʾÊôÐÔ´°¿Ú
SHIFT + F4ÏÔʾÏîÄ¿ÊôÐÔ´°¿Ú
CTRL + SHIFT + EÏÔʾ×ÊÔ´ÊÓͼ
F12 תµ½¶¨Òå
CTRL + F12תµ½ÉùÃ÷
CTRL + ALT + J¶ÔÏóä¯ÀÀ
CTRL + ALT + F1°ïÖúĿ¼
CTR ......

ASP.NET ÌØÊâ×Ö·ûµÄÒâ˼(ûÍêÉÆ)

“<%#....%>” ÕâÊÇÊý¾Ý°ó¶¨£¬ÀïÃæ¿ÉÒÔµ÷ÓÃC#µÄ·½·¨¡£
“<%$....%>" û¼û¹ýÕâ¸ö¡£
“<%@...%>”Õâ¸öÊÇÒ³ÃæÖ¸Áһ°ã·ÅÔÚÿ¸öÒ³ÃæµÄ×î¶¥²¿£¬¶ÔÒ³ÃæµÄÔËÐнøÐпØÖÆ£¬ÈçÉèÖûº´æ£¬ÒýÓÃÓû§¿Ø¼þ£¬µ¼ÈëÃüÃû¿Õ¼ä==
ÁíÍ⻹ÓÐÒ»¸ö<%= ...%>  Õâ¸ö=ºÅºóÒ²¿ÉÒÔµ÷ÓÃC#µÄ·½· ......

Ìá¸ßasp.net ajaxÓ¦ÓóÌÐòÐÔÄܵÄһЩ·½·¨

1. Êʵ±Ê¹ÓÃUpdatePanel
2. ÀûÓÃWebService·½·¨¶¯Ì¬Éú³ÉÓû§¿Ø¼þµÄÄÚÈÝ£¬±ÜÃâUpdatePanel»Ø´«Ôì³ÉµÄÐÔÄÜËðʧ£¨ViewState£©
3. ToolkitScriptManager´úÌæScriptManager
4. <asp:ScriptManager runat="server" ID="sm" ScriptMode="Release" EnablePartialRendering="false"
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ