当出现ID=12345678时,跳转到404 如下代码应该怎么改。谢谢if (Request["id"] != null)
{
id = Request["id"].ToString().Trim(); string result = GetHtml("http://download.csdn.net/source/"+id+".html"); }
{
id = Request["id"].ToString().Trim(); string result = GetHtml("http://download.csdn.net/source/"+id+".html"); }
{
Response.Redirect("notfound.aspx");
}
else if(Request["id"]!=null)
{
id = Request["id"].ToString().Trim(); string result = GetHtml("http://download.csdn.net/source/"+id+".html");}
{
id = Request["id"].ToString().Trim(); string result = id=="12345678"?GetHtml("notfound.aspx"):GetHtml("http://download.csdn.net/source/"+id+".html"); }
string result =Request["id"] != null? GetHtml("http://download.csdn.net/source/"+Request["id"].ToString()+".html"):GetHtml("notfound.aspx");
{
Response.StatusCode = (int)System.Net.HttpStatusCode.NotFound;
}