My buttons that opens modals stop working.

My buttons that opens modals stop working.

jacojaco Posts: 3Questions: 2Answers: 0
edited November 2023 in Free community support

My buttons that opens modals stop working after I added the datatables plugin.

Code in C#
protected void btnAddFolder_Click(object sender, EventArgs e)
{
Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "showModal()", true);
}
javascript function
function showModal() { $('#myModal').modal('show');}

Answers

  • allanallan Posts: 62,205Questions: 1Answers: 10,205 Site admin

    You are using C# to attach a Javascript event listener? What section of .NET are you using (Razor, MVC, something else)?

    I can't help with that bit, but if you link to a test case showing the issue I might be able to say why it isn't working on the client-side.

    Allan

Sign In or Register to comment.