You would be able to get the id in query string, only issue I could notice is there is missing "?ImageID=" while creating the url.
private void GetImageFromDatabase(int ID)
{
Image1.ImageUrl = "picview.ashx"+ID.ToString();
}
<pre lang="cs">private void GetImageFromDatabase(int ID)
{
Image1.ImageUrl = "picview.ashx?ImageID="+ID.ToString();
}</pre>