protected void btnSubmit_Click(object sender, EventArgs e)
{
ViewState["DataScorceName"] = datasource;
ViewState["Customer"] = txtCustomer.Text;
}
public void MyFunction()
{
string sqlConnectionString = "Persist Security Info=True;User ID=sa;Password=Sa;Initial Catalog=" + DBName + ";Data Source='" + ViewState["DataScorceName"] + "'";
}
Tuesday, August 24, 2010
How to create connection string dynamically
Here i am using viewstate to create connection string at run time.
0 comments:
Post a Comment