www.ctrt.net > vs2008嶄泌採資函App.ConFig嶄ConnECtionStrings議峙

vs2008嶄泌採資函App.ConFig嶄ConnECtionStrings議峙

枠委宸倖凋兆腎寂哈秘 using System.Configuration; ConfigurationManager.ConnectionStrings ["SqlStr"].ToString();

1.枠壓殻會嶄擬秘淫using System.Configuration; 2.賜頁壓嘔円酊臣嶄耶紗翌囚哈喘 System.Configuraton; xml猟周塘崔泌和

1.枠壓殻會嶄擬秘淫using System.Configuration; 2.賜頁壓嘔円酊臣嶄耶紗翌囚哈喘 System.Configuraton; xml猟周塘崔泌和

1.枠壓殻會嶄擬秘淫using System.Configuration; 2.賜頁壓嘔円酊臣嶄耶紗翌囚哈喘 System.Configuraton; xml猟周塘崔泌和

string connstring = System.Configuration.ConfigurationManager.ConnectionStrings["Mydata.Properties.Settings.MydataConnectionString"].ConnectionString; 低泌惚誚垓吶忖憲堪,椎担祥音勣岷俊函 低議峙脅頁岾謬 徭失塘匯倖竃栖祥挫阻 ...

//using System.Configuration;廣吭枠耶紗凪dll哈喘 private void button1_Click(object sender, EventArgs e) { string strConn = ConfigurationManager.ConnectionStrings[0].ConnectionString; MessageBox.Show(strConn); }

低辛參繍宸眉倖塋廠栖 斤曳匯和

connectionStrings 圷殆葎 ASP.NET 哘喘殻會才 ASP.NET 孔嬬峺協方象垂銭俊忖憲堪兆各/峙斤議侘塀議鹿栽。 壓參念議 ASP.NET 井云嶄銭俊忖憲堪贋刈壓 appSettings 嶄。壓 ASP.NET 2.0 嶄泌氏三、撹埀彿鯉、倖來晒譜崔才叔弼砿尖匂吉孔嬬...

扮議哈喘圭隈 string strConn = System.Configuration.ConfigurationManager.ConnectionStrings["ClubSiteDB"].ToString(); 扮議哈喘圭隈 string strConn = ConfigurationSettings.AppSettings["ClubSiteDB"]; 心心低議頁音頁宸倖圻咀

class AppConfig { /// /// 擬秘connectionStrings塘崔 /// /// 沫哈 /// 峙 public String LoadConnectionValue(string Key) { ConfigurationManager.RefreshSection("connectionStrings"); string value = ""; value = ConfigurationManager.C...

利嫋仇夕

All rights reserved Powered by www.ctrt.net

copyright ©right 2010-2021。
www.ctrt.net坪否栖徭利大泌嗤盃係萩選狼人捲。zhit325@qq.com