You must Sign In to post a response.

connection string in wpf

I am new to wpf,please explain how to make connection string in app.xaml file.


#285577    Author: Aravind PK    23 Aug 2008 Member Level: Gold   Points : 4

Use app.config to create connection string as how you may use in web.config file for connection settings in web based apps.

it can be like,
<add key=".[your connection string key name you choose to have]." value="..[connection string value]..">

#286626    Author: ParasGautam  25 Aug 2008 Member Level: Bronze   Points : 6

Hey Thanks for replying,but I tried the solution you gave,I put <appsetting> tag in app.xaml file like

<Application x:Class="WpfBinding.App"


But it gives the following error:-

Error1: The tag 'appsetting' does not exist in XML namespace '

Error2:The type 'appsetting' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.

plese help

This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.