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

Explain the overview of ado.net architecture?

522


What is oledb connection?

509


What is adodb dll?

520


What is sql connection in ado.net?

500


What is ado connection?

507






Define Execute Scalar?

553


Explain the role of data provider in ado.net? What is the role of data provider in ado.net?

529


Explain how to copy the contents from one table to another table and how to delete the source table in ado.net?

456


Is ado.net dead?

540


What is the use of connection object in ado.net?

566


Describe the command object and its method.

524


What are the advantage of ado.net?

523


How to create data relations?

550


What is meant by ‘transaction’ in a database and what are the ‘properties of transaction’?

533


What is a column variable?

505