If your connection string is created dynamically at run time. We cannot set the connection string at design time. Binding to the property might not work since this depends on when you call DataBind on your controls.
In this case, it's better to set this in code behind event handler for Page_Load like
Sincerely,
Kevin Yu
Microsoft Online Community Support
Please remember to click “Mark as Answer” on the post that helps you, and to click “Mark as Not Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Kevin Yu - M...
All-Star
19021 Points
1467 Posts
Re: Dynamic connection strings
Feb 08, 2007 05:24 AM|LINK
Hi,
If your connection string is created dynamically at run time. We cannot set the connection string at design time. Binding to the property might not work since this depends on when you call DataBind on your controls.
In this case, it's better to set this in code behind event handler for Page_Load like
Me.dsTest.ConnectionString = objClientConnection.ConnectionString
Then you can call DataBind() manually.
HTH.
Kevin Yu
Microsoft Online Community Support
Please remember to click “Mark as Answer” on the post that helps you, and to click “Mark as Not Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.