How to you declare connection strings and how to you make
use of web.config ?

Answer Posted / ansu kumar

in
web.config file
<appsetting>
<add key="constr" value="data source=database name;
database=database name"/>
</appsetting>

and
in .aspx file
string str=configurationsetting.appsetting.constr;

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are advantages of microsoft-provided data provider classes in ado.net?

785


What is difference between sqldatareader and sqldataadapter?

728


Give few examples of datareader that is used in different dataproviders.

762


What is the difference between linq and ado.net?

748


What are the essential features of ado.net?

741


What is ado.net components?

711


What are the methods of XML dataset object?

823


What we do with the object of ado.net dataset after using it?

738


Explain ado.net features?

802


What is the use of SqlCommand object?

917


What is the difference between the clone() and copy() methods of the dataset class?

798


Which is the feature of ado.net?

769


How to retrieve the user id which is provided while windows authentication?

838


How can we save all data from dataset?

748


How do I delete a row from a DataTable?

807