Click here to Skip to main content
15,912,493 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# GUI classes Pin
John Fisher8-Mar-04 11:27
John Fisher8-Mar-04 11:27 
GeneralConnection String Pin
YomYom8-Mar-04 10:19
YomYom8-Mar-04 10:19 
GeneralRe: Connection String Pin
Mazdak8-Mar-04 10:28
Mazdak8-Mar-04 10:28 
GeneralRe: Connection String Pin
Heath Stewart8-Mar-04 10:34
protectorHeath Stewart8-Mar-04 10:34 
Create a file called yourapp.exe.config and put it in the same directory as your application. In there, you should have something like this:
<configuration>
  <appSettings>
    <add key="connString" value="my connection string"/>
  </appSettings>
</configuration>
In your code, you can use Configuration.AppSettings["connString"] to get the connection string. This is a very common practice and there are many examples both here on CodeProject, in the .NET Framework SDK (like Mazdak said, look up information about configuration files), and all over the web.

 

Microsoft MVP, Visual C#
My Articles
GeneralRaise Event Pin
laptop_018-Mar-04 9:51
laptop_018-Mar-04 9:51 
GeneralRe: Raise Event Pin
Yasir Memon8-Mar-04 10:19
Yasir Memon8-Mar-04 10:19 
GeneralRe: Raise Event Pin
laptop_018-Mar-04 10:27
laptop_018-Mar-04 10:27 
GeneralRe: Raise Event Pin
Heath Stewart8-Mar-04 10:37
protectorHeath Stewart8-Mar-04 10:37 
GeneralRe: Raise Event Pin
laptop_018-Mar-04 11:07
laptop_018-Mar-04 11:07 
GeneralRe: Raise Event Pin
LongRange.Shooter9-Mar-04 7:38
LongRange.Shooter9-Mar-04 7:38 
GeneralContext Menu - Display Member, Value member Pin
Ruchi Gupta8-Mar-04 9:08
Ruchi Gupta8-Mar-04 9:08 
GeneralRe: Context Menu - Display Member, Value member Pin
Heath Stewart8-Mar-04 10:31
protectorHeath Stewart8-Mar-04 10:31 
GeneralRe: Context Menu - Display Member, Value member Pin
Ruchi Gupta8-Mar-04 10:36
Ruchi Gupta8-Mar-04 10:36 
GeneralRe: Context Menu - Display Member, Value member Pin
Heath Stewart8-Mar-04 10:39
protectorHeath Stewart8-Mar-04 10:39 
GeneralRe: Context Menu - Display Member, Value member Pin
Ruchi Gupta8-Mar-04 10:43
Ruchi Gupta8-Mar-04 10:43 
GeneralIE Snapshot ...Is this possible with C# Pin
AWebDude8-Mar-04 8:05
AWebDude8-Mar-04 8:05 
GeneralRe: IE Snapshot ...Is this possible with C# Pin
Heath Stewart8-Mar-04 10:17
protectorHeath Stewart8-Mar-04 10:17 
GeneralRe: IE Snapshot ...Is this possible with C# Pin
Russell Morris8-Mar-04 10:18
Russell Morris8-Mar-04 10:18 
GeneralRe: IE Snapshot ...Is this possible with C# Pin
Heath Stewart8-Mar-04 10:44
protectorHeath Stewart8-Mar-04 10:44 
GeneralRe: IE Snapshot ...Is this possible with C# Pin
Russell Morris8-Mar-04 10:56
Russell Morris8-Mar-04 10:56 
GeneralRe: IE Snapshot ...Is this possible with C# Pin
Heath Stewart8-Mar-04 11:00
protectorHeath Stewart8-Mar-04 11:00 
Questionhow do you use string from WWW-Authenticate header? Pin
godzooky8-Mar-04 7:42
godzooky8-Mar-04 7:42 
AnswerRe: how do you use string from WWW-Authenticate header? Pin
Heath Stewart8-Mar-04 8:44
protectorHeath Stewart8-Mar-04 8:44 
GeneralI want Enter key to act like Tab key on a DataGrid Pin
mud778-Mar-04 7:26
mud778-Mar-04 7:26 
GeneralRe: I want Enter key to act like Tab key on a DataGrid Pin
Heath Stewart8-Mar-04 8:49
protectorHeath Stewart8-Mar-04 8:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.