Yes I've read a lot on how to make this thing work, but unfortunately mine is a dynamic button and all id are unique; so it's created using StringBuilder
in C# like so:
html.Append("<button id=\"" + dr["ID"].ToString() + "\" type=\"submit\" class=\"btn btn-primary btn-xs\" data-toggle=\"modal\" data-target=\"#myModal\" runat=\"server\" onserverclick=\"btnShowModal_ServerClick\"><i class=\"fa fa-eye\"></i></button>");
Obviously it opens up a modal, but I want to do something before it opens up the modal inside the btnShowModal_ServerClick
event. Sadly it doesn't hit, the event, but it hits the Page_Load
event because of the attribute type="submit"
which makes the modal NOT show up. Any workaround on this? i've been spending 3hrs on this already.