Click here to Skip to main content
15,891,316 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<div class="zoom-anim-dialog mfp-hide" id="login" runat="server">
                    <div class="popup-header">
                        <h4 class="modal-title" id="myModalLabel">LOGIN</h4>
                    </div>
                    <div class="popup-body">
                        <div class="reg_form_desc">
                            Welcome to GentekLabs
                        </div>
                        <div class="form-group">
                            <asp:TextBox ID="txtname" runat="server"  placeholder="User Name" class="form-control"></asp:TextBox>
                            <%--<input id="txtname" runat="server" type="text" name="Name" placeholder="User Name" class="form-control" />--%>
                        </div>
                        <div class="form-group">
                            <input id="txtpass" runat="server" type="password" name="txtpass" placeholder="Password" class="form-control" />
                        </div>
                        <div class="block">
                            <a href="#" id="btnlogin" class="btn btn-login" runat="server" oncli="submit();" onclick="btnlogin_Click">Login</a>
                            <a class='regislink' href="#">Forgot your password</a>
                        </div>
                    </div>
                </div>

<script>
                    $(document).ready(function () {
                        $('.popup-login').magnificPopup({
                            type: 'inline',

                            fixedContentPos: false,
                            fixedBgPos: true,

                            overflowY: 'auto',

                            closeBtnInside: true,
                            preloader: false,

                            midClick: true,
                            removalDelay: 300,
                            mainClass: 'my-mfp-zoom-in'
                            , callbacks: {
                                close: function () {
                                    $('body').css('overflow-y', '');
                                },
                                open: function () {
                                    $('body').css('overflow-y', 'scroll');
                                }
                            }
                        });
                    });
                   
                </script>


What I have tried:

protected void btnlogin_Click(object sender, EventArgs e)
    {
        string user = ((TextBox)login.FindControl("txtname")).Text;
}
Posted
Updated 23-Dec-17 23:17pm

1 solution

Um....
C#
protected void btnlogin_Click(object sender, EventArgs e)
    {
    string user = txtname.Text;
    ...
    }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900