使用ASP.NET C#重命名表单运行时 [英] Rename form Runtime using asp.net c#

查看:63
本文介绍了使用ASP.NET C#重命名表单运行时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行项目时,将运行default.aspx页面.我想在运行时将其名称更改为ABCXYZ.aspx ...然后如何将其命名为

请给我任何建议

提前thnx

when i run project then default.aspx page is run. i want to change its name to ABCXYZ.aspx at runtime... then how its posible

plz give me any suggession

thnx in advance

推荐答案

右键单击ABCXYZ.aspx,然后单击设置为起始页".
Right-click ABCXYZ.aspx and click ''Set as Start Page''.


您将已经启动了网页,那么在运行时更改启动页的目的是什么?我在这里有点困惑.
You would already have started the web page, so what would be the purpose of changing the startup page at runtime? Im a little confused here.


除了所有解决方案之外,我会提出的建议,

我假设您想要的是,当您将要运行站点Default.aspx时,您将看到一个Default.aspx页面.地址栏上的Default.aspx将显示为ABCXYZ.aspx,并且您未提及对默认值的物理重命名. aspx到ABCXYZ.aspx .

如果我是正确的,那么您可能需要考虑在ASP.NET中重写URL,请访问以下网站,

ASP.NET中的URL重写 [
Beside all the solutions, what I would proposed,

I assume what you would want is, you have a Default.aspx page when you woould run the site Default.aspx will be displaying as ABCXYZ.aspx in the address bar and also YOU ARE NOT mentioning physical renaming of the default.aspx to ABCXYZ.aspx.

If I am correct then you might need to consider URL rewriting in ASP.NET, please a have a look following site,

URL Rewriting in ASP.NET[^]

Hope it helps :)


这篇关于使用ASP.NET C#重命名表单运行时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆