如何使用没有参数的URL路由3.5 asp.net从全局文件中指向URL?

时间:2010-11-26 18:23:34

标签: c# asp.net url url-routing

如何使用不带参数的URL路由3.5 asp.net从全局文件中指向网址?

例如:

var url = "subdomain";

if(url == "subdomain")
{
//Route to the specific url
}

if(url == "subdomain2")
{
//Route to the specific url
}

1 个答案:

答案 0 :(得分:0)

如果我理解正确,你可以试试

Server.Transfer("yourpage.aspx");

Response.Redirect("http://www.google.com");

为了提供更详细的答案,我们都需要您提供更多细节。