How to create create variables/properties in master page, and let sub-pages access them?
So my master will have a string property HomeUrl
How can any page that uses the master page access this property?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should use a base class for you master page which will define you properties:
And then your master page should inherit from this
BaseMasterPageclass (as example):After this you can access your property through
Page.Masterproperty:from any page which uses this master page.