Auto click a button in asp.net on page load event

Sep 5, 2009 Posted by Lara Kannan
In page load event itself, you just call the that button click event.

private void Page_Load(object sender, System.EventArgs e)
{
Button1_Click(null, null); // This button event ll fire while page load.
}

This code will execute the button click event also, when page load event executes.
Share
Labels: ,

Post a Comment