Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Read and Write to Windows Registry
Message
 
To
09/07/2003 08:11:36
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00807861
Message ID:
00808715
Views:
23
>Thank you very much Morgan, but I am very new with ASP.NET .. could you please give me an example for defining connectionstring thru web.config and also how to implement it into webform? .. thanks a lot in advance
>
>
>Best Regards
>

Inside of your web.config in appsettings
<appsettings>
    <add key="ConnectionString" value="server=(local);database=FooBar;uid=sa;pwd=somepass" />
   
</appsettings>
Inside of your application
string cConnection = ConfigurationSettings.AppSettings["ConnectionString"];
And there you go. I hope that helps.

Morgan
Previous
Reply
Map
View

Click here to load this message in the networking platform