fix System.NullReferenceException in C#
<p>i m developing a website and stuck with  System.NullReferenceException .
on the master page I m using this code </p>

<pre><code>if (Request.Url.ToString().ToLower().Contains("content.aspx"))
{
    if (Request.Params["ModuleID"].ToString() == null)
    {
        Response.Redirect("Content.aspx?ModuleID=1");
    }
}
</code></pre>

<p>when Module Id is blank then it creates null reference exception.</p>
