开发者

Menu in C# to be used on Classic ASP pages

开发者 https://www.devze.com 2023-03-31 14:57 出处:网络
I created a menu which changes as per the role logged in. So, this is created in the master page. So, I would like to use this same menu once logged in on every asp page. Since, I\'m not much into asp

I created a menu which changes as per the role logged in. So, this is created in the master page. So, I would like to use this same menu once logged in on every asp page. Since, I'm not much into asp(VB especially), the idea I have is to create a menu in a asp page and include it i开发者_如何学JAVAn all the other pages. But I just like to know if there is another way i can handle this like using the menu in the master page to be used on classic asp pages..can u help me out?


I've worked on a few sites that integrated classic ASP pages with ASP.NET.

One option is to put the menu in a master page, and create an ASPX page to load your classic ASP pages using Server.Execute. That way, the menu and the site layout would be in ASP.NET, and your content pages would be classic ASP.

Using this approach, you would obviously have to remove all formatting from your ASP pages so ASP.NET can handle the layout. Your ASP pages would be purely content - kind of like master pages and content pages.


if all the other pages use the same master then it will appear on them also. You can have masters that have masters if some need to have different masters.

Alternatviely you could move it into a user control and add that onto the pages where required


EDIT Forget it, you mean classic ASP? Not clear in your question, sorry. EDIT

I would place a ContentPlaceHolder in the Master Page that contains a LoginView control. Use the various templates (e.g. LoggedInTemplate, AnonymousTemplate, RoleGroups) of the LoginView to display the menu you want based on your needed criteria. The reason for putting the LoginView control in a ContentPlaceHolder is so that your Pages that use the Master can easily replace or remove the menu if needed.

0

精彩评论

暂无评论...
验证码 换一张
取 消