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

ASP.NET²Ù×÷web.config

      ASP.NET¿ÉÒÔÀûÓÃWebConfigurationManagerºÍÖ±½ÓÀûÓÃXML·½Ê½²Ù×÷web.config,WebConfigurationManager±È½Ï¼òµ¥£¬µ«ÊÇÇå³ý×¢ÊÍ´úÂë¡£Á½Õß²Ù×÷·½Ê½¶¼ÐèÒªÓÐдȨÏÞ¡£
      ·½·¨Ò»£¬ÀûÓÃWebConfigurationManager£¬ÐèÒªÒýÓÃSystem.Web.Configuration.WebConfigurationManager£»
     Ìí¼ÓÏ
     Configuration config = WebConfigurationManager.OpenWebConfiguration(null);
     AppSettingsSection app = config.AppSettings;
    app.Settings.Add("key", "valueadd");
    config.Save(ConfigurationSaveMode.Modified);
  
     ÐÞ¸ÄÏ
     Configuration config = WebConfigurationManager.OpenWebConfiguration(null);
     AppSettingsSection app = config.AppSettings;
     app.Settings["key"].Value = "valuemodify";
     config.Save(ConfigurationSaveMode.Modified);
     ɾ³ýÏ
     Configuration config = WebConfigurationManager.OpenWebConfiguration(null);
     AppSettingsSection app = config.AppSettings;
     app.Settings.Remove("key");
     config.Save(ConfigurationSaveMode.Modified);
     ÐÞ¸ÄÁ¬½ÓÏ
      Configuration config = WebConfigurationManager.OpenWebConfiguration(Request.ApplicationPath);
ConnectionStringsSection conSection = (ConnectionStringsSection)config.GetSection("connectionStrings");
conSection.ConnectionStrings[Request["type"].ToString()].ConnectionString = Request["connstr"];
config.Save(ConfigurationSaveMode.Modified);
 XmlDocument xmldoc = new XmlDocument();
            string filename = Common.FilePath("../web.config");
    &nbs


Ïà¹ØÎĵµ£º

asp.netÈçºÎ°ÑÎļþÉÏ´«µ½ÁíÍâһ̨·þÎñÆ÷[CSDN]¡£

asp.netÈçºÎ°ÑÎļþÉÏ´«µ½ÁíÍâһ̨·þÎñÆ÷?
ÎÒÓÃÓ³ÉäÍøÂçÅ̵ÄÐÎʽ,¿ÉÊdzÌÐòÎÞ·¨½«Îļþ±£´æµ½ÍøÂçÓ³ÉäÅÌÉÏ.
ÈçºÎ¹²ÏíÎļþ¼ÐµÄ»°,Îļþ¼Ð±ØÐëÓÐдÈëµÄȨÏÞ,¿ÉÊÇÕâÑùµÄ»°¾ÖÓòÍøÄÚËùÓеÄÈ˶¼¿ÉÒÔÉÏ´«µ½Õâ¸ö¹²ÏíĿ¼ÁË?
½¨Ò飺
Õâ¸öÎÒÕýºÃ×ö¹ýµÄ£¬ºÇºÇ£¬¸øÄã²Î¿¼
¼ÙÉèÓзþÎñÆ÷AÊÇweb·þÎñÆ÷£¬ÎļþҪͨ¹ýA·þÎñÆ÷ÉϵÄweb³ÌÐòÉÏ´«µ ......

ASP.NET´¦ÀíSession¶ªÊ§

-----------------------------------------------------ÒýÑÔ¿ªÊ¼-----------------------------------------------------
      ÊÂÇéµÄÆðÒòÊÇÕ¾µã³öÏÖδµÇ½µÄ¼ÙÏ󣬵ã×ŵãמÍÌøµ½µÇ½ҳ»òÌáʾÓû§µÇ½¡£
ÒòΪºÜ¶àÒ³Ãæ¶¼¼Ì³ÐÁËÒ»¸öPageBaseÀ࣬Õâ¸öÀà»áÅжÏÓû§ÊÇ·ñµÇ½Èç¹ûûÓеǽ¾Í»á ......

Ïê½âVS2010ÖÐASP.NET @PageÖ¸ÁîÊôÐÔ

@PageÖ¸ÁîλÓÚÿ¸öASP.NETÒ³ÃæµÄ¶¥²¿£¬¸æËßASP.NETÕâ¸ö¾ßÌåÒ³ÃæÊ¹ÓÃʲôÊôÐÔ£¬ÒÔ¼°¸ÃÒ³Ãæ¼Ì³ÐµÄÓû§¿Ø¼þ¡£ASP.NETÒ³Ãæ
@PageÖ¸ÁîÊôÐÔÓУºAspCompat¡¢Async¡¢AsyncTimeout¡¢AutoEventWireup¡¢Buffer¡¢
ClassName¡¢ClientIDMode¡¢CodeBehind¡¢
CodeFile¡¢CodeFileBaseClass¡¢CodePage¡¢CompilationMode ¡¢ContentType¡¢ ......

asp.netÖ÷»úÉèÖþ­Ñé

Äú¿ÉÒÔͨ¹ýÒÔÏÂÉèÖÿØÖÆasp.net¶Ô·þÎñÆ÷ÄÚ´æµÄÕ¼Óᣲ¢ÄÜÉèÖÃaspnet½ø³Ì¶¨Ê±Öؽ¨£¨ÀàËÆIIS6ÖÐAppPoolÀïµÄ¶¨Ê±ÖØÆô£©£¬ÕâÑù¿ÉÒÔ±ÜÃâ·þÎñÆ÷³¤Ê±¼äÔËÐÐaspnetÕ¼ÓôóÁ¿¿ÕÏÐÄڴ棬ÓÐÀûÓÚÌá¸ßaspnetÔËÐÐЧÂÊ¡£
aspnetÅäÖÃÎļþλÖÃΪ
CWINDOWSMicrosoft.NETFrameworkv1.1.4322CONFIGmachine.config
ÓÃÎı¾±à¼­Æ÷´ò¿ª¸ÃÎļþ£¬ÕÒµ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ