Display postback value
<p>I am working on a project and I found that the Session transferred value not being displayed in Label on first click. On clicking the button for the second time only the Session transferred value is being displayed. The sample code is below please let me know how to get the value displayed on the first click. Note: Value to be displayed inside the <code>IsPostBack</code> function as I am using lots of functions inside <code>IsPostBack</code></p>

<pre><code>protected void Page_Load(object sender, EventArgs e)
{
    if (IsPostBack)
    {
        string kitty = Convert.ToString(Session["ping"]);
        Label1.Text = kitty;
    }
}
protected void Button1_Click(object sender, EventArgs e)
{

    string a = TextBox1.Text;
    Session["ping"] = a;
}
</code></pre>
