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 is difference between datareader and dataadapter?

546


What does executereader return?

525


What is the use of ADO.NET and XML web services?

592


What are the benefits of using of ADO.NET in .NET 4.0?

537


Some important instruction regarding ADO.NET connection string ?

542






Which control of the BindingNavigator returns the current position within the data source?

729


What is the difference between sqldatareader and sqldataadapter?

489


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

553


What Is Difference Between Ado And Ado.net?

558


How to create data relations?

548


What is the difference between an ADO.NET Dataset and an ADO Recordset?

548


What is ado.net tutorial?

503


What are the steps to connect to a database?

546


What is the maximum pool size in ado.net connection string?

500


What do you mean by performing asynchronous operation using command object?

510