Click here to Skip to main content
15,888,454 members
Home / Discussions / C#
   

C#

 
AnswerRe: Use Visual Studio for Office or Reference Word Obj Lib? Pin
Charlie Williams8-Mar-04 12:27
Charlie Williams8-Mar-04 12:27 
GeneralC# GUI classes Pin
abc8768-Mar-04 11:07
abc8768-Mar-04 11:07 
GeneralRe: C# GUI classes Pin
Christian Graus8-Mar-04 11:08
protectorChristian Graus8-Mar-04 11:08 
GeneralRe: C# GUI classes Pin
Nick Parker8-Mar-04 17:59
protectorNick Parker8-Mar-04 17:59 
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 

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.