重定向到网页而不提供页面扩展名 [英] Redirecting to a web page without giving page's extension

查看:85
本文介绍了重定向到网页而不提供页面扩展名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网络应用程序中有两个页面,其应用程序菜单中没有提供链接。我希望用户通过键入url来外部访问它们。但不是像abc.aspx这样的完整页面名称。我想重定向只需写下www.myapp.co.in/abc\"该页面即可。我怎么做?

I have two pages in my web app whose link is not provided in application menu.i want the user to access them externally by typing the url.But not the complete page name like "abc.aspx".I want to redirect to that page just by writing "www.myapp.co.in/abc".How can i do this?

推荐答案

试试这个



string geturl = string.empty;

geturl = www.myapp.co.in/abc+\".aspx;





只是将字符串与扩展名连接起来(.aspx / asp / html)
Try this

string geturl = string.empty;
geturl= www.myapp.co.in/abc+".aspx";


just concatenate the string with extension (.aspx/asp/html)


这篇关于重定向到网页而不提供页面扩展名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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