How to you declare connection strings and how to you make
use of web.config ?
Answer Posted / prasad
In web.config file just plase
<appSettings>
<add key="ConStr" value="Provider=SQLOLEDB.1;User
ID=sa;Initial Catalog=Sample;Data Source=ABC"></add>
</appsettings>
and in CS file
sqlconnection con = new sqlconnection
(ConfigurationSettings.AppSettings["ConStr"]);
and u can u this connection any where in ur App.
Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is the current version of entity framework?
How to identify the updated rows in a dataset?
What is ado oledb and odbc?
Does dapper use ado.net?
What does executenonquery () method return?
What are the key features of ado.net?
Which is faster dataset or datareader?
Does sqlclient and oledb class share the same functionality?
What is the use of data grid?
What is oledb connection?
Do we use stored procedure in ADO.Net?
What is data adapter in ado.net with example?
Explain ODP.net
What is variable view?
What are the benefits of using ado.net?