ASP.NET Page naming using master pages -


i have 2 user types: readers , authors. , i'm using reader.master , author.master authorization purposes.

then, there storiesr.aspx inherited reader.master , storiesa.aspx inherited author.master. (in storiesr.aspx page, able read stories , in storiesa.aspx able write story.) so,

  1. reader.master --> storiesr.aspx
  2. author.master --> storiesa.aspx

now, thing don't want users see storiesr.aspx?s=3 or storiesa.aspx?s=3 in browsers. want them see stories?s=3. (even without .aspx part)

how can achieve this?

you can using urlmappings web.config file

add in web.confing

<system.web>     <!--          set compilation debug="true" insert debugging          symbols compiled page. because          affects performance, set value true          during development.     -->     <urlmappings enabled="true">         <add url="~/reader/stories" mappedurl="~/reader/storiesr.aspx"/>         <add url="~/author/stories" mappedurl="~/author/storiesa.aspx"/> 

this url mapping.


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 -