如何在浏览器中更改文件名 [英] how to change name of file in browser
问题描述
请有人告诉我们,如何以编程方式为浏览器更改文件名,如在浏览器中访问扩展名不存在的.net页面,例如services.aspx将更改浏览器中的服务
另一个例子是我在一个网站上有同样的东西是另外一个例子是我在一个网站上有同样的东西是
http://www.andrewsonline.co.uk/land-and-new- homes/land-planning-development [ ^ ]
在此示例中,页面没有.aspx扩展名
我想知道这在asp.net编程中是可能的
pls告诉我们很紧急.
Pls some one tell that how to change the file name programmatically for browser like to accessing a page of .net in browser the extension is not there, for example services.aspx will change services in browser
Another example is i have one of site the same thing is therenother example is i have one of site the same thing is there
http://www.andrewsonline.co.uk/land-and-new-homes/land-planning-development[^]
in this example there is no .aspx extension for the pages
i want to know this can possible in asp.net programming
pls tell it is urgent.
推荐答案
是的.它称为"URL重写".
Google是您的朋友.
Yes. It''s called "url rewriting".
Google is your friend.
尝试这个
http://msdn.microsoft.com/en-us/library/ms972974.aspx [ ^ ]
try this
http://msdn.microsoft.com/en-us/library/ms972974.aspx[^]
使用APS.NET MVC 2.0或更高版本时,默认情况下没有任何扩展名,并且可以控制应用程序如何解码地址.
对于普通的ASP.NET(Web表单),我不知道...请参阅其他解决方案.
When using APS.NET MVC 2.0 or latter, you don''t have any extension by default and you have a lot of control how the address are decoded by your application.
For plain ASP.NET (Web Forms), I don''t know... See other solutions.
这篇关于如何在浏览器中更改文件名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!