ConnectionString property has not been initialized!!

  • Thread starter Thread starter Kamal
  • Start date Start date
K

Kamal

Hi everyone,

I've created a user control that calls some method from a class that set the
connection string, the connection string is stored in the App.Config file.
When i try to add that control into a form, the following message Appears:

"The ConnectionString property has not been initialized"

and i won't allow me to add it and if i add my control in code, the
designer won't work and would display only the above message?!

Any idea how to solve this problem?!

Any help would be very much appreciated ..

Thanks in advance,
Kam
 
Kamal said:
Hi everyone,

I've created a user control that calls some method from a class that set the
connection string, the connection string is stored in the App.Config file.
When i try to add that control into a form, the following message Appears:

"The ConnectionString property has not been initialized"

and i won't allow me to add it and if i add my control in code, the
designer won't work and would display only the above message?!

Any idea how to solve this problem?!

Any help would be very much appreciated ..

Add an app.config file to the usercontrol project and add the setting to
that config file as well.

Frans.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top