<input id="Register" runat="server" type="button" value="注册" onclick="Register_Onclick" />protected void Register_Onclick(object sender, EventArgs e)
{
string url = HttpContext.Current.Request.ApplicationPath + "/" + "~/Page/Register.aspx";
Response.Redirect(url);
}什么地方有问题?大家帮我看看!
谢谢大家!
{
string url = HttpContext.Current.Request.ApplicationPath + "/" + "~/Page/Register.aspx";
Response.Redirect(url);
}什么地方有问题?大家帮我看看!
谢谢大家!
protected void Register_Onclick(object sender, EventArgs e)
{
string url = "~/Page/Register.aspx";
Response.Redirect(url);
}
{
string url = HttpContext.Current.Request.ApplicationPath + "/" + "~/Page/Register.aspx";
Response.Redirect("http://"url"");
}
AutoEventWireup="true"属性
还有就是
Response.Redirect(url)重定向的时候写相对路径就可以了
onserverclick="Button1_Click"
string url = HttpContext.Current.Request.ApplicationPath + "/" + "~/Page/Register.aspx";