Click here to Skip to main content
15,924,195 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: How to regenerate web.config + Seeking tips and info on web.config! Pin
aamironline10-Nov-06 16:28
aamironline10-Nov-06 16:28 
Questioncontrols with table Pin
Mohammed Elkholy10-Nov-06 10:25
Mohammed Elkholy10-Nov-06 10:25 
AnswerRe: controls with table Pin
Vasudevan Deepak Kumar10-Nov-06 21:14
Vasudevan Deepak Kumar10-Nov-06 21:14 
QuestionDatasets in ASP.Net Pin
theflux12310-Nov-06 10:06
theflux12310-Nov-06 10:06 
AnswerRe: Datasets in ASP.Net Pin
indianet10-Nov-06 11:22
indianet10-Nov-06 11:22 
Questionhow to make my site reads arabic Pin
karimkamal10-Nov-06 9:45
karimkamal10-Nov-06 9:45 
AnswerRe: how to make my site reads arabic Pin
Vasudevan Deepak Kumar10-Nov-06 21:15
Vasudevan Deepak Kumar10-Nov-06 21:15 
QuestionAccessing Parent Page Property from User Control Pin
GregStevensCA10-Nov-06 9:26
GregStevensCA10-Nov-06 9:26 
I have a base page class (BasePage) that all pages on my site inherit.

I also have a database abstraction class (DBClass) that I use to handle all interaction with my database. I have it set up so that when you create an instance of DBClass, it creates a connection to the database, and then all methods on that instance of DBClass use that connection to interact with the database.

So, my idea was to create a public property DB of BasePage that is an instance of DBClass. That way, the database connection will be open and available when the page is loaded and I should be able to make use of it for any calls to the database I might want when loading page content.

So far so good (although if you see any problems with the logic so far, please let me know).

However, now I have the following issue: I have a User Control defined on the page that has to make use of the database. I don't want to create a *new* instance of DBClass inside that user control; it seems like it would be better to just use the public property DB of the main page, that was already created.

But I can't figure out how to reference the page property DB from inside the user control.

Any help or insight would be greatly appreciated.

------G
AnswerRe: Accessing Parent Page Property from User Control Pin
Guffa10-Nov-06 10:19
Guffa10-Nov-06 10:19 
GeneralRe: Accessing Parent Page Property from User Control Pin
GregStevensCA10-Nov-06 11:20
GregStevensCA10-Nov-06 11:20 
GeneralRe: Accessing Parent Page Property from User Control Pin
indianet10-Nov-06 12:40
indianet10-Nov-06 12:40 
GeneralRe: Accessing Parent Page Property from User Control Pin
Guffa10-Nov-06 12:59
Guffa10-Nov-06 12:59 
QuestionWeird character insertion Pin
Marc Paliotti10-Nov-06 8:35
Marc Paliotti10-Nov-06 8:35 
AnswerRe: Weird character insertion Pin
Marc Paliotti10-Nov-06 9:15
Marc Paliotti10-Nov-06 9:15 
QuestionExtract content from Word Documents Pin
GaryWoodfine 10-Nov-06 8:22
professionalGaryWoodfine 10-Nov-06 8:22 
AnswerRe: Extract content from Word Documents Pin
indianet10-Nov-06 9:13
indianet10-Nov-06 9:13 
GeneralRe: Extract content from Word Documents Pin
GaryWoodfine 10-Nov-06 22:53
professionalGaryWoodfine 10-Nov-06 22:53 
QuestionEnvironment Independent Connection Strings Pin
robert11010-Nov-06 8:09
robert11010-Nov-06 8:09 
AnswerRe: Environment Independent Connection Strings Pin
ednrgc10-Nov-06 8:46
ednrgc10-Nov-06 8:46 
GeneralRe: Environment Independent Connection Strings Pin
robert11010-Nov-06 8:58
robert11010-Nov-06 8:58 
GeneralRe: Environment Independent Connection Strings Pin
ednrgc10-Nov-06 8:59
ednrgc10-Nov-06 8:59 
QuestionConfused with Output cache set programmatically Pin
SharpSmith10-Nov-06 6:51
SharpSmith10-Nov-06 6:51 
Questionhow to include .js file for one page using master page? Pin
vicky45710-Nov-06 6:42
vicky45710-Nov-06 6:42 
AnswerRe: how to include .js file for one page using master page? Pin
Guffa10-Nov-06 7:11
Guffa10-Nov-06 7:11 
AnswerRe: how to include .js file for one page using master page? Pin
indianet10-Nov-06 12:51
indianet10-Nov-06 12:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.