转:打开Web.Config在 <configuration> 后面添加:

打开Web.Config在 <configuration> 后面添加: 

<appSettings> 
                <add   key= "ConnectionString "   value= "你的连接字符串 "   /> 
</appSettings> 


在程序中获取: 
string   connectionString   =   ConfigurationSettings.AppSettings[ "ConnectionString "];
posted @ 2010-11-13 22:17  ccczqh  阅读(406)  评论(0编辑  收藏  举报