I have an asp.net webform application and i want to pass the value entered in my asp:TextBox for the users name to then be displayed on my confirmation modal.


        <div class="form-group">        
            <asp:Label runat="server" AssociatedControlID="txtRemoveUser" CssClass="col-sm-offset-2 col-sm-3 control-label">Enter Name To Be Removed</asp:Label>
            <div class="col-sm-3">
                <asp:TextBox runat="server" ID="txtRemoveUser" CssClass="form-control" />

<!-- Confirm Delete Modal-->
<div class="modal fade" id="removeUserModal">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header ConfirmHeader">
                <h4 class="modal-title" id="myModalLabel">Confirm Removal</h4>
            <div class="modal-body">
                <p>Are you sure you want to remove <b><%= txtRemoveUser.Text %></b> from the payday lunch list?</p>
                <p>If you don't, click 'No' and the removal request will not be sent.</p>                    
            <div class="modal-footer ConfirmFooter">
                <asp:Button id="btnRemoveConfirmYes" runat="server" CssClass="btn btn-success" Text="Yes" OnClick="btnRemoveConfirmYes_Click" ToolTip="Click to request user to be removed from the payday lunch list." />
                <button id="btnRemoveConfirmNo" type="button" class="btn btn-warning" data-dismiss="modal" title="Click to close this screen. The request will not be sent.">No</button>

I have tried the following <%= txtRemoveUser.Text %> but it doesn't work.

Related posts

Recent Viewed