To handle master page button event in content page



Do not specify any button click handler in the master page, instead specify one for each content page. 
You may try:

In page_load for each content page:

Button btn = this.Master.FindControl("Button1") as Button; //specify your button id given in master page
btn.Click += new System.EventHandler(myBtnClickHandler);

public void myBtnClickHandler (object sender, EventArgs e)
        {

            TextBox1.Text = string.Empty; //write the desired code

        }

Comments

Popular posts from this blog

How to retain the data annotations or class during modify a table in the database

Interview Questions

AJAX CONTROL