![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![ExpandedBlockStart.gif](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
if
(
!
IsPostBack)
{
// 如果请求ID为空,则重写URL为:~/WebForm3.aspx?ID=zzx1250zh
if (Request.QueryString[ " ID " ] == null || Request.QueryString[ " ID " ].Trim() == "" )
{
HttpContext.Current.RewritePath( " ~/WebForm3.aspx?ID=zzx1250zh " );
}
Response.Write(Request.QueryString[ " ID " ]);
}
{
// 如果请求ID为空,则重写URL为:~/WebForm3.aspx?ID=zzx1250zh
if (Request.QueryString[ " ID " ] == null || Request.QueryString[ " ID " ].Trim() == "" )
{
HttpContext.Current.RewritePath( " ~/WebForm3.aspx?ID=zzx1250zh " );
}
Response.Write(Request.QueryString[ " ID " ]);
}