c# - Is it possible to have a single URL that points to two different pages? -


I have a URL (/ settings) that indicates two different pages based on the security of users on login is required. One page is the current webform page, the other is a new MVC page. Is this also possible?

Additional information: The URL needs to be provided to the website when the user is on any page / solution

Solution: The prime minister is sure to change the requirements.

-Farm (method)

This is often a poor practice to do such an incident, because it can highlight the data, it is actually possible:

Javascript:

  $ (document) .ready (function () {if ($ ("# account") .val ()! = '') {$ (". Url"). Attr ('href', 'http://www.google.com');}});  

Excuse # ACC is a secret field that has populated your database. If the field not tap, then modify the .Url element to navigate the link. This approach is most simple for web-form .

WebForm :

  Secure zero btnAccount_Click (object sender, eventAgps E) (if (user.inignol ("account")) Response. Redirect ("~ / admin .spx"); Other responses. Redirect ("~ / User.aspx");}  

will use the default Windows authentication for that domain, You can twist and copy to use the database to draw data. One example, Model View Controller It will be as if controller handles that capability.

This point is expected in the right direction.

>

Comments