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 Edit: Almost forgotten, you may also have a 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; }
master
property on your page, These types of behaviors are performing as your ASPX markup.
& lt;% @ MasterType VirtualPath = "~ / masters / SourcePage.master" "%>
Comments
Post a Comment