以下代码怎么没有实现出错后转到ERROR.ASPX啊??
try
{
string id = Request.QueryString["id"].ToString();
int bid = Convert.ToInt32(id);
DataSet ds = new DataSet();
ds = clm.findbookmessage(bid);//我把BID去掉后出现了错误,但没有转到ERROR.ASPX页。出现了一个 “/web”应用程序中的服务器错误的提示。
this.GridView1.DataSource = ds.Tables[0];
this.GridView1.DataBind();
this.GridView1.Dispose();
getdatepin();
}
catch (Exception)
{
Response.Redirect("error.aspx");
}
你那样写是跟当前页面同一目录下的,跳转写个相对路径啦汗,两星怎么来的...
二星就是这样来的.