I am facing an issue with a gridview, bootstrap modal that is nested inside an update panel on a content page referencing a master page.
The gridview comprises of 3 columns and a linkbutton.
Even though I expect the javascript to be triggered when the Linkbutton event is fired, it fails to do so.
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(funct1);
Although I've attempted this solution, I encounter a 'sys undefined error' in the console.
This is a snippet of my code:
GridView -> View Button ->
var link = (Control)sender;
GridViewRow row = (GridViewRow)link.NamingContainer;
Label LiD = (Label)row.FindControl("LabelID");
id = Convert.ToInt32(LiD.Text);
Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "funct1()", true)
MandateDetailusingId(id);
I also gave a shot at using:
//ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "MyFunction", "funct1()", true);
Here's the javascript function being referenced:
function funct1() {
$('#<%=MandateView.ClientID%>').modal("toggle");
return false;
} // div id="MandateView"
Is there a way to trigger the pop-up modal given that everything exists within the updatepanel?