master pages - ASP.NET MasterPage usage for authorization purposes -


i using master pages authorization. have 3 different user types: readers, authors , admins.

i have main.master has fundamental things of pages. have,

  1. reader.master
  2. author.master
  3. admin.master

these inherited main.master. checking if user logged in (session not null) , if usertype true in reader.master, author.master, admin.masters page_init() functions.

first question: practice? please consider have 0 experience of using other asp.net built-in stuff user management, authorization etc..

second question: there pages forgotpassword.aspx usertypes should access same page. in structure, need create 3 different pages inherited 3 different master's. how solve issue?

to first question: use similar. i'm not sure if solution works me.

second question: can define contentplaceholder in master pages.

<asp:contentplaceholder id="myid" runat="server" /> 

in aspx site define each contentplaceholder 1 content container.

<asp:content contentplaceholderid="pagecontent" runat="server">     <!-- content area --> </asp:content> 

if define in 3 user type master pages contentplaceholder same id can use in page forgot.aspx same content each master page.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -