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

Which is the feature of ado.net?

603


What are the main differences between classic ado and ado.net?

613


Explain the basic use of "dataview" and explain its methods.

608


describe the dataset object in ado.net.

605


What is the difference between a datareader and a dataset?

598






What is bubbled event can you please explain?

627


What is dbcontext and dbset in entity framework?

570


How do you connect to sql server database without using sqlclient?

649


What is the role of clr?

621


What are the data access namespaces in .NET?

724


What is ole in vb?

592


What is openrowset?

584


What is an ADO.Net?

650


Which method is used by command class to execute SQL statements that return single value?

643


What is ado and rdo?

576