我想实现这样一个custom-url .一旦用户输入
http://localhost/website/username --它将把用户带到一个定制页面,其中只显示与用户有关的信息。我已经想出了这样的网址
Public sUsername = ""http://localhost/website/<%= sUsername %>,但我被困在了如何在登陆页面上应用这个问题上?登陆页面将是Default.aspx吗?
发布于 2015-02-25 17:22:09
在用户注册之前,您什么都不能做。除此之外,您很可能使用登录或cookie(cookie在某个时候失败)。
如果你问如何做一个友好的URL,答案是URL重写。几年前就写过了(样本在VB.NET中)。
http://weblogs.asp.net/scottgu/tip-trick-url-rewriting-with-asp-net
路由也是一种可能性:http://www.asp.net/web-forms/overview/routing
注意:我的目标是ASP.NET WebForms,但同样的概念也适用于ASP.NET MVC。
https://stackoverflow.com/questions/28724619
复制相似问题