How will you identify whether the page is post backed or not?

 Posted by Rajni.Shekhar on 4/12/2012 | Category: ASP.NET Interview questions | Views: 1733 | Points: 40
Answer:

using "IsPostBack" property.

Example

protected void Page_Load(object sender, EventArgs e)

{
if (!Page.IsPostBack)
{
//code that runs first time not execute when page is post back.
}
}


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response