help with NullReference exception in C#
<p>The following is a web method that is called from ajax, I have verified with firebug that the script is indeed passing two string values to my method:</p>

<pre><code>public string DealerLogin_Click(string name, string pass)
{
    string g="adf";
    if (name == "w" &amp;&amp; pass == "w")
    {
        HttpContext.Current.Session["public"] = "pub";
        g= "window.location = '/secure/Default.aspx'";
    }

    return g;
}
</code></pre>

<p>I'm passing "w" just for testing purposes. If I delete the if block then I don't get an error back from the server. I'm confused.</p>
