Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6933805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:52:46+00:00 2026-05-27T11:52:46+00:00

In my master page, on the menu there is an icon which uses Jquery

  • 0

In my master page, on the menu there is an icon which uses Jquery to slide, showing 2 textboxes (username, password) for users to enter & 1 submit button. My idea is that after submitting, I get values of these 2 fields to assigned it to an invisible Login Control in my MasterPage, then validate automatically.
I could get values and assign but problem is I don’t know how to trigger the Login button in Login Control (how to force it to process information)? the DataBind() func doesn’t work

Master.master

<div id="login">
                        <p>
                            <asp:Login ID="Login2" runat="server" DestinationPageUrl="~/Index.aspx" LoginButtonStyle-CssClass="button_login"
                                TextBoxStyle-CssClass="input-name" Visible="false">
                            </asp:Login>
                            <asp:TextBox ID="inputUser" CssClass="input-name" Text="Username" runat="server"></asp:TextBox>
                            <asp:TextBox ID="inputPassword" CssClass="input-pass" Text="Password" runat="server"
                                TextMode="Password"></asp:TextBox>
                            <asp:Button ID="btn_login" CssClass="button_login" runat="server" OnClick="triggerLogin" />
                        </p>
</div>

Main.master.cs:

 protected void triggerLogin(object sender, EventArgs e)
        {
            Login2.UserNameLabelText = inputUser.Text;
            Login2.PasswordLabelText = inputPassword.Text;
            Login2.DataBind();
        }

Actually I already have a login page which processes individually, is it possible to pass information to that page to process?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T11:52:47+00:00Added an answer on May 27, 2026 at 11:52 am

    Yeah, I’ve found out the solution, without having to use Login Control. I can do it manually.

    <asp:TextBox ID="inputUser" CssClass="input-name" Text="Username" runat="server"></asp:TextBox>
                                <asp:TextBox ID="inputPassword" CssClass="input-pass" Text="Password" runat="server"
                                    TextMode="Password"></asp:TextBox>
                                <asp:Button ID="btn_login" CssClass="button_login" runat="server" OnClick="triggerLogin" />
    

    Codebehind:

    protected void triggerLogin(object sender, EventArgs e)
        {
            TextBox txtbxInputUser = (TextBox)Page.Master.FindControl("inputUser");
            TextBox txtbxInputPass = (TextBox)Page.Master.FindControl("inputPassword");
    
            Label samplelabel1 = (Label)Page.Master.FindControl("sampleLabel1");
    
            if (System.Web.Security.Membership.ValidateUser(txtbxInputUser.Text, txtbxInputPass.Text))
            {
    
                System.Web.Security.FormsAuthentication.SetAuthCookie(txtbxInputUser.Text, false);
            }
            else
            {
                Response.Redirect("Login.aspx?Attempt=wrong");
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a master page, there's only one menu item and a contentplaceholder there.
There is a master page with a simple menu at the top (MenuItem1, MenuItem2
I am calling .ashx file for download excel file from Master page menu item.
The boss wants the master page's menu to look nicer. I generated my gradient
I have a master page that contains an ASP.NET server side Menu control (System.Web.UI.WebControls.Menu)
I have a menu of report links in my master page. I need to
I have a master page with Header, Menu, Content and Footer panes in my
I have a master page, with a help link in the top menu. This
I have created user control for menu bar and loading in Master page. User
When a page that uses a master page doesn't have an asp:Content control for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.