Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Read and Write to Windows Registry
Message
 
À
09/07/2003 08:11:36
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00807861
Message ID:
00808715
Vues:
22
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform