Here's the modal:
<div class="modal fade" id="messmodal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<div class="modal-title">
New Message to <% Response.Write(Session("tempsess")) %></div>
</div>
<button type="button" class="btn btn-primary">
Send</button>
</div>
</div>
</div>
</div>
Here's the link button that launches the modal:
<asp:LinkButton ID="LinkButton1" runat="server"
CssClass="btn btn-success fa fa-comments-o"
OnCommand="getshisid" CommandArgument='<%# Eval("profile_id") %>'
data-toggle="modal" data-target="#messmodal">
</asp:LinkButton>
And here's the code behind for the link button:
Sub getshisid(ByVal Sender As Object, ByVal e As CommandEventArgs)
Dim commandArgsAccept As Integer = e.CommandArgument
Dim proid As Integer = commandArgsAccept
Session("tempsess") = proid
Dim prosess As Integer
prosess = Convert.ToInt32(Session("tempsess"))
Response.Write(prosess)
End Sub
Without using the following line in the link button, the code-behind works perfectly:
data-toggle="modal" data-target="#messmodal"
Once this line is re-included, the button only opens the modal and the code-behind doesn't function.
How'd I go around this?