When retrieving a value from a query string in PHP you can add a check first to make sure the query string exists.
var $query_id;
if (isset($_GET["id"))
$query_id = $_GET["id"];
How do I check to see if a query string exists before trying to use it in C#?
string queryID;
if (??????)
queryID = HtmlPage.Document.QueryString["id"].ToString();
...
Go to the complete details ...