By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,797 Members | 1,315 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,797 IT Pros & Developers. It's quick & easy.

ConnectionString property has not been initialized!!

P: n/a
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
Nov 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Kamal wrote:
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.

--
Get LLBLGen Pro, the new O/R mapper for .NET: http://www.llblgen.com
My .NET Blog: http://weblogs.asp.net/fbouma
Microsoft C# MVP
Nov 16 '05 #2

P: n/a
i have but it still the same!!
"Frans Bouma [C# MVP]" <pe******************@xs4all.nl> wrote in message
news:xn***************@msnews.microsoft.com...
Kamal wrote:
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.

--
Get LLBLGen Pro, the new O/R mapper for .NET: http://www.llblgen.com
My .NET Blog: http://weblogs.asp.net/fbouma
Microsoft C# MVP

Nov 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.