|
I wrote the following code in the Button_onclick event:
Button btnDel = (Button) sender;
Response.Write ("<script language = javaScript> alert ('hhh'); </ script>");
// This sentence can pop up a dialog box
btnDel.Attributes ["onclick"] = "alret ('AAA')";
// but this sentence does not work
Later, I wrote <script language = javaScript> alret ("AAA_2") </ sript> on the client
Result: The "AAA_2" dialog box pops up first, and the dialog box in the click event can pop up.
What is the problem ??? |
|