using a connection string from the web.config file?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?UGF1bA==?=

    using a connection string from the web.config file?

    Hi I have a connection string defined in the webconfig file as
    <connectionStri ngs>
    <add name="employee-devConnectionSt ring" connectionStrin g="connectionin fo"
    providerName="S ystem.Data.SqlC lient" />
    </connectionStrin gs>

    In the code a create a connection and then set the string as
    SqlConnection1. ConnectionStrin g="connectionin fo";
    I would like to use the connection string I have set up in the web.config
    but not sure
    the code I need on the webpage? I am using 2005,thanks.
    --
    Paul G
    Software engineer.
Working...