please ans me
-
can i access master page variables from appcode files if yes please give me a suggestion
-
can i access master page variables from appcode files if yes please give me a suggestion
amarnath n.n wrote:
Subject: please ans me
This should not be the subject. You have to ask the qestion in proper way.
amarnath n.n wrote:
can i access master page variables from appcode files if yes please give me a suggestion
In
App_Code
, you should have classes. So make thePublic Property
Over There, Create objectApp_Code
Class and Asign the Value from Master page. Then you will get variable value on youApp_Code
.Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.
-
amarnath n.n wrote:
Subject: please ans me
This should not be the subject. You have to ask the qestion in proper way.
amarnath n.n wrote:
can i access master page variables from appcode files if yes please give me a suggestion
In
App_Code
, you should have classes. So make thePublic Property
Over There, Create objectApp_Code
Class and Asign the Value from Master page. Then you will get variable value on youApp_Code
.Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.
sorry,excuseme!!! my actual question is how to access controls in master page from appcode class
-
sorry,excuseme!!! my actual question is how to access controls in master page from appcode class
The non nasty way to do this, is to have a class derived from Page, which returns a strongly typed version of your master page derived class, instead of just the base master. Then you can access the proprties of the master page neatly in any page derived from your new base class. A new base class lets you define all sorts of things and make them visible to all pages, as well as putting any code to check if a user is logged in, in one place.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.