I am using bootstrap modal popup, and this div
is (FOR EXAMPLE) a popup [using a repeater]
<div id="messageContent">Hello World!</div>
This pop-up can be opened by doing this (this works):
<a href="#messageContent" role="button" class="btn" data-toggle="modal">Open Popup</a>
But I want to pass some DataBinder.Eval
-values with the <a href=""></a>
, and this is not possible, so this is what I tried with a linkbutton
:
<asp:LinkButton ID="lbOpenMessage" runat="server" CommandName="OpenMessage" CommandArgument='<%#Eval("MessageID")%>'>Open Popup</asp:LinkButton>
But I am not abled to call the <a href="#messageContent"></a>
in the linkbutton to open the pop-up.
When I do something like 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 the e.Commandname
-event doesn't get fired, so I don't get the MessageID.
What can I do to open the pop-up with <a href="#messageContent"></a>
, with passing the DataBinder.Eval
-values?
I did some research, but couldn't find anything.