c# - Open popup with linkbutton -
i using bootstrap modal popup, , div
(for example) popup [using repeater]
<div id="messagecontent">hello world!</div>
this pop-up can opened doing (this works):
<a href="#messagecontent" role="button" class="btn" data-toggle="modal">open popup</a>
but want pass databinder.eval
-values <a href=""></a>
, , not possible, tried linkbutton
:
<asp:linkbutton id="lbopenmessage" runat="server" commandname="openmessage" commandargument='<%#eval("messageid")%>'>open popup</asp:linkbutton>
but not abled call <a href="#messagecontent"></a>
in linkbutton open pop-up.
when this:
<asp:linkbutton id="lbopenmessage" runat="server" commandname="openmessage" commandargument='<%#eval("messageid")%>'> <a href="#messagecontent" role="button" class="btn" data-toggle="modal">open popup</a> </asp:linkbutton>
then e.commandname
-event doesn't fired, don't messageid.
what can open pop-up <a href="#messagecontent"></a>
, passing databinder.eval
-values?
i did research, couldn't find anything.
you need show modal via javascript call opposed markup shortcuts. refer here http://getbootstrap.com/javascript/#modals
the function want call $('#mymodal').modal(options)
so in item command event want following:
if (e.commandname == "yourcommandname") { // stuff needs done scriptmanager.registerstartupscript(this.page, this.gettype(), "key", " $('#mymodal').modal(options);", true); }
Comments
Post a Comment