Tuesday, December 7, 2021

ISPostback in asp.net in page_load event C#

When clicking on button, that goes to ispostback condition and when redirecting from one page to another that goes to (!ispostback) condition


  protected void Page_Load(object sender, EventArgs e)

    {

        if(IsPostBack)

        {

            btnClickMe.Enabled = false;

        }

        else

        {

            btnClickMe.Enabled = true;

        }

    }

No comments:

Post a Comment