Priya via .NET 247 wrote:
> In our project we have more than 20 DataAdapters. I created
> connection parameters in web.config file. If i have to change the
> connecting string for all the DataAdapter do i have to manually
> change in the properties. Is there any other alternative way to
> achieve the same.
>
Priya,
If you have a SqlConnection object on the form (along with the SqlDataAdapters),
then open the SqlConnection's properties, then open Dynamic Properties,
then click in the ConnectionString property. A "..." button will show up.
Click on it. If you then select "Map property to a key in configuration file"
option and select a key, the SqlConnection will then use the connection string
in the web.config file. Do this for each page that had a SqlConnection
object on the WebForm. Enjoy!
--
Thanks,
Carl Prothman
Microsoft ASP.NET MVP
Hire top-notch developers at
http://www.able-consulting.com