3
Answers

postback problem on button click

Muhammad younas

Muhammad younas

12y
3.8k
1
i have a page in asp.net.
i m using a script to disable button on post back. i used script
 this.DisableButtonOnPostBack(this.btnNext, "Wait...");

public void DisableButtonOnPostBack(Button button, string text)
    {
        button.Attributes["onclick"] =
            string.Format(
                "this.value = '{0}';this.disabled = true;{1};",
                text,
                button.Page.ClientScript.GetPostBackEventReference(button, null));
    }


it works fin in goggle chroom but when i run this page on Firefox it dos'nt work. it post back page twice sometimes.

can anyone help me???????
Answers (3)