Thursday, December 20, 2012

cast a wider net when fishing for server variables when switching from Response.Redirect to Server.Transfer

long asset_id = 0;
HttpContext CurrContext = HttpContext.Current;
if (CurrContext.Items["id"] != null)
{
   asset_id = Convert.ToInt64(Request.QueryString["id"]);
}
if (! (Request.QueryString["id"] == null))
{
   asset_id = Convert.ToInt64(Request.QueryString["id"]);
}

No comments:

Post a Comment