RE: SqlConnection Object Keeping Reappearing
From: Brad Roberts (BradRoberts_at_discussions.microsoft.com)
Date: 01/07/05
- Next message: Elton Wang: "[urgent] how to output image in place"
- Previous message: Vai2000: "Re: Zip File Download Error!!!"
- In reply to: MrMike: "SqlConnection Object Keeping Reappearing"
- Next in thread: MrMike: "RE: SqlConnection Object Keeping Reappearing"
- Reply: MrMike: "RE: SqlConnection Object Keeping Reappearing"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 7 Jan 2005 06:01:02 -0800
You may be enlightened if you take a look at the "web designer generated
code" that is in the code-behind file. When you have connection objects
inserted in the designer the development environment will probably create the
connection string object to contain the connection string that has been
entered as a property to the connection object in the designer.
Take care to avoid modifications to the code that is generated until you are
familiar with what is going on.
Note that you can write the code yourself, without the designer, to
accomplish the same thing.
"MrMike" wrote:
> I have a web.config file containing the SQLConnection String to a SQL
> Database. Before I implemented this SQLConnection String into web.config, I
> had individual SQLConnection objects in each webform's designer tray. I am
> now going back through the webforms and replacing the individual
> SQLConnection Objects with a pointer to web.config ConnectionString.
>
> However, whenever I delete the SQLConnection String objects from each
> webform, they reappear the next time I open the webform. Why do these things
> reappear? I'm making no references to them in the code-behind, so why do
> they reappear?
>
> Thanks.
- Next message: Elton Wang: "[urgent] how to output image in place"
- Previous message: Vai2000: "Re: Zip File Download Error!!!"
- In reply to: MrMike: "SqlConnection Object Keeping Reappearing"
- Next in thread: MrMike: "RE: SqlConnection Object Keeping Reappearing"
- Reply: MrMike: "RE: SqlConnection Object Keeping Reappearing"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|