Faisal Ansari

Faisal Ansari

  • NA
  • 451
  • 821.1k

Session

Aug 9 2011 6:50 AM
hello guys how r u all?

my question is that,

i want to know that how much time my page is refreshed means if i press the refresh button i display the counter and that counter should be increase

i am doing like this

protected void Page_Load(object sender, EventArgs e)
{
        if (!Page.IsPostBack)
        {
            Session["page"] = 1;
            if (Session["page"] != null)
            {
                int count = Convert.ToInt32(Session["page"].ToString());
                Response.Write(count++);
            }

        }
}

please reply soon

thanks.

Answers (2)