asp.net - How to access an enum in master page -


Can we use an enum that is defined in the master page? I read about the master page on my blog.

If you have an actual enum , defining it elsewhere is a better option , But the same functioning given below also works to get it.

If you want to use the property that enum then enter your page's master property on the type of your master page like this: / P> Secure Zero Override OnLoad (EventAGRS E) {(MyMasterPagesType Master). MyEnumProperty = MyEnum.Value; }

Edit:

Almost forgotten, you may also have a master property on your page, These types of behaviors are performing as your ASPX markup.

  & lt;% @ MasterType VirtualPath = "~ / masters / SourcePage.master" "%>  

Comments

Popular posts from this blog

asp.net - Change the driver in the connection string to a data source in VB.Net -

Getting started consuming web services in a Ruby on Rails 3 application -

objective c - iPhone and it's wireless area -