Posted on: 10/16/2012 2:52:08 AM | Views : 331

Hello, I have a created a function for querystring, to detect if the ID pass is genuine or not and not works perfectly. The problem is, how can I apply this code:
string imageID = Context.Request.QueryString["ID"]; int result; string[] urlSplit = imageID.Split('&'); try { if (!String.IsNullOrEmpty(imageID) && (int.TryParse(imageID, out result)) && ((urlSplit.Length < 2))) { Page.Response.ContentType = "image/gif"; Page.Response.BinaryWrite((new CustomPopups.ImageBrowserForInsertToDb()).GetImageBytes(int.Parse(imageID))); } else { Response.StatusCode = 404; Response.StatusDescription = "Not found."; Response.End(); } } catch { Response.StatusCode = 404; Respons ...

Go to the complete details ...