Include Header.aspx file
-
Hi guys need help I have the main menu which is created in the header.aspx which is included to the rest of my application webform. In my header.aspx i used Hyperlink as menu button. The role and access is checking is in my every application webform. Now the issue is that i will like to move the code of my role and access checking funtion to a class file that can be share through out my webform however when i move to a class file it complicate that matter that i can't set the header.aspx hyperlink porperties as is no include to the class file. How can i set the portperties in the header.aspx from my class file? Any solution or idea will be deeply apperciated Thanks Guys KaKaShi HaTaKe
-
Hi guys need help I have the main menu which is created in the header.aspx which is included to the rest of my application webform. In my header.aspx i used Hyperlink as menu button. The role and access is checking is in my every application webform. Now the issue is that i will like to move the code of my role and access checking funtion to a class file that can be share through out my webform however when i move to a class file it complicate that matter that i can't set the header.aspx hyperlink porperties as is no include to the class file. How can i set the portperties in the header.aspx from my class file? Any solution or idea will be deeply apperciated Thanks Guys KaKaShi HaTaKe
I'd suggest you to derive your new class from
System.Web.UI.Page
. OverridePage
event and do the checking there. All other forms in your website should derive from the newly created class. I have explained this here[^]. Also including files like the way you have done is old ASP style approach. In ASP.NET, you can take advantage of Master pages or user controls.Navaneeth How to use google | Ask smart questions