I,
Front-end code:
<Div>
<Asp: scriptmanager id = "scriptmanager1" runat = "server">
</ASP: scriptmanager>
<Asp: updatepanel id = "updatepanel1" runat = "server">
<Contenttemplate>
</Contenttemplate>
<Triggers>
<Asp: asyncpostbacktrigger controlid = "button1" eventname = "click"/>
<Asp: asyncpostbacktrigger controlid = "button2" eventname = "click"/>
</Triggers>
</ASP: updatepanel>
<Asp: button id = "button1" runat = "server" text = "pop-up confirmation message" onclick = "button#click"/>
& Nbsp; <asp: button id = "button2" runat = "server" text = "pop-up select row information"
Onclick = "button2_click"/>
& Nbsp;
<Asp: Label id = "label1" runat = "server"> </ASP: Label>
</Div>
Background code:
Protected void button#click (Object sender, eventargs E)
{
Scriptmanager. registerstartupscript (updatepanel1, updatepanel1.gettype (), "", "alert ('OK! ') ", True );
}
Method 2:
Front-end code:
<Div>
<Asp: scriptmanager id = "SM" runat = "server">
</ASP: scriptmanager>
<Asp: updatepanel id = "up" runat = "server">
<Contenttemplate>
<Asp: button id = "btncommit" runat = "server" text = "button"
Onclick = "btncommit_click"/>
& Nbsp;
<Asp: Label id = "label1" runat = "server" text = "label"> </ASP: Label>
</Contenttemplate>
</ASP: updatepanel>
</Div>
Background code:
Protected void btncommit_click (Object sender, eventargs E)
{
/// Obtain the button in the pop-up dialog box
Button button = (button) sender;
/// Script of the registration dialog box
Scriptmanager. registerclientscriptblock (button, button. GetType (), button. uniqueid, "alert ('This is a dialog box in the Ajax Web environment. '); ", True );
}