ASP.NET page Refresh problem solved, but need clarification!
<p>I have solved the problem on page refresh in asp.net using below mentioned code.</p>

<p>I got this code from the net.
It's working fine. But i cant able to understand the concept.</p>

<p>Please clarify how its working..</p>

<pre><code>    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Session["CheckRefresh"] =
            Server.UrlDecode(System.DateTime.Now.ToString());
        }

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (Session["CheckRefresh"].ToString() ==
        ViewState["CheckRefresh"].ToString())
        {
            Label1.Text = "Hello";
            Session["CheckRefresh"] =
            Server.UrlDecode(System.DateTime.Now.ToString());
        }
        else
        {
            Label1.Text = "Page Refreshed";
        }
    }

    protected void Page_PreRender(object sender, EventArgs e)
    {
        ViewState["CheckRefresh"] = Session["CheckRefresh"];
    }
</code></pre>

<p>Thanks in advance</p>
