I have this code on the OnClick
event of a Button
:
if (true) {
ClientScript.RegisterStartupScript(UpdatePanel1.GetType(), "", "show_modal('true');", true);
} else {
ClientScript.RegisterStartupScript(UpdatePanel1.GetType(), "", "show_modal();", true);
}
And I define the Button as a trigger for an UpdatePanel
:
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnEdit" EventName="Click" />
</Triggers>
The function show_modal
is located into a .js
file which is included into the ASP page.
How can I make this script works?