且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

任何用户登录后如何更改网址?

更新时间:2023-12-02 11:31:34

Login_click()
{
  Responese.Redirect("newPage.aspx");
}


Login_click()
{
//... validate the user and get the user name
Response.Redirect(username +".sample.com");
}



我还没有测试过,但我想您已经尝试过了



Ive not tested this but I guess you''ve already tried


这对我来说很有效
this worked for me though
string name = "plus";
            string url = "http://www."+name+".google.com";
            Response.Redirect(url);



如果要在本地主机中重定向,请使用



If you want to redirect in localhost then use

Server.MapPath(url)