R
R.A.M.
Hello,
I am beginner.
Could you help me please how to connect to SQL Sever using connection
string in Web.config?
I have:
<configuration>
<appSettings/>
<connectionStrings>
DataSource=PC\SQLEXPRESS;User ID=sa;Password=sqlserver;
Initial Catalog=DemoDotNET
</connectionStrings>
and code behind:
private string ConnectionString
{
get
{
SessionStateSection sss = new SessionStateSection();
return sss.SqlConnectionString;
}
}
but I got ConnectionString == "data source=localhost;Integrated
Security=SSPI" instead of text from Web.config.
How to programme it corectly?
Thank you very much!
/RAM
I am beginner.
Could you help me please how to connect to SQL Sever using connection
string in Web.config?
I have:
<configuration>
<appSettings/>
<connectionStrings>
DataSource=PC\SQLEXPRESS;User ID=sa;Password=sqlserver;
Initial Catalog=DemoDotNET
</connectionStrings>
and code behind:
private string ConnectionString
{
get
{
SessionStateSection sss = new SessionStateSection();
return sss.SqlConnectionString;
}
}
but I got ConnectionString == "data source=localhost;Integrated
Security=SSPI" instead of text from Web.config.
How to programme it corectly?
Thank you very much!
/RAM