English 中文(简体)
How to rewrite urls such as example.com/1Bta62 to example.com/view.aspx?id=1Bta62 虽然用户仍然见到实例.com/1Bta62?
原标题:How to rewrite urls such as example.com/1Bta62 to example.com/view.aspx?id=1Bta62 whilst the user still sees example.com/1Bta62?

作为尿素缩短服务的一部分,我需要用户能够去除一个尿素,例如example.com/1Bta62,最后在example.com/view.aspx?id=1Bta62example.com/1Bta62则在其浏览器地址酒吧中保留。 如何做到这一点?

我正在使用一个窗户服务器(项目是C# ASP.NET);我更希望不必使用文字(即,在网上做些事情,会是巨大的),但欢迎对任何方法的答复。 The url ends such as the one above 1Bta62 are/61/6ally.

提前感谢!

Edit: 任何人是否实际管理/了解如何与网络联系。 简编——我认为可以这样做?

问题回答

请尝试登记地区登记路线。 例如,

context.MapRoute(
            "Myproject_default",
            "Myproject/{controller}/{action}/{id}",
            new { controller = "Myproject", action = "index", id = UrlParameter.Optional }
        );




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签