Finding previous page Url
<p>i am trying to find the url of previous page.Such as if a user navigates from Page A to Page B using <code>Server.Redirect("B.aspx")</code>, page B can display the url referring to it.</p>

<p>I have tried using </p>

<pre><code>Response.Write(Page.PreviousPage.ToString());

Response.Write(Request.UrlReferrer.ToString());

Response.Write(Context.Request.UrlReferrer.ToString());

Response.Write(Request.ServerVariables["HTTP_REFERER"].ToString);
</code></pre>

<p>but all in vain it gives me <code>null exception</code> error</p>
