I currently have the following code within the OnClick
event of a Button
:
if (true) {
ClientScript.RegisterStartupScript(UpdatePanel1.GetType(), "", "show_modal('true');", true);
} else {
ClientScript.RegisterStartupScript(UpdatePanel1.GetType(), "", "show_modal();", true);
}
Furthermore, I have designated the Button as a trigger for an UpdatePanel
:
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnEdit" EventName="Click" />
</Triggers>
The function show_modal
is housed within a separate .js
file that is linked to the ASP page.
Any suggestions on how to ensure this script operates correctly?