วันจันทร์ที่ 19 พฤษภาคม พ.ศ. 2557

Edit file web configuration

step 1
using System.Web.Configuration;
using System.Configuration;
step 2
var configuration = WebConfigurationManager.OpenWebConfiguration("~");
Find file the web config.
var section = (ConnectionStringsSection)configuration.GetSection("connectionStrings");
select tax for editor.
section.ConnectionStrings["MyConnectionString"].ConnectionString = "Data Source=...";
Edit name tax.
configuration.Save();
save file web config.

ไม่มีความคิดเห็น:

แสดงความคิดเห็น