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 8534165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:07:54+00:00 2026-06-11T10:07:54+00:00

I have this issue of a drop down menu for my login. When I

  • 0

enter image description hereenter image description here

I have this issue of a drop down menu for my login. When I press the Log In link the drop down menu slides down. What I want is when wrong credentials are given to do not postback(refresh) so that the drop down menu will stay open for the user to type the correct password!

I have tried OnClientClick=”return false;” but this disables the onclick event of my asp:button.

My code behind:

string insCmd = "SELECT ID_USER FROM users WHERE username = @LoginEmail AND password = @passwd;";
        SqlCommand Login = new SqlCommand(insCmd, con);

        Login.Parameters.AddWithValue("@LoginEmail", txtLoginEmail.Text);
        Login.Parameters.AddWithValue("@passwd", txtLoginPassword.Text);

        try
        {
            SqlDataReader dr = Login.ExecuteReader();
            SqlDataReader dr2;

            if (dr == null || !dr.HasRows)
            {
                litErrorLogin.Text = "<span>Error:Wrong Credentials</span>";

                //btnLogin.OnClientClick = "return false;";
                return;
            }

            while (dr.Read())
            {
                Session["UserID"] = dr.GetInt32(0);
            }

My html code:

<div id="bb_loginForm">
    <div class="bg_loginForm">
        <span style="font-size:11.5px;font-weight:bold">Log in to Account</span> <a class="bb_linkLoginHeaderHide" href="#" title="Hide">
            Hide</a>
        <br />
        <div class="f_username">
            <label for="txtLoginEmail" id="labelUser">
                Email
            </label>
            <br />
            <asp:TextBox class="text-input" ID="txtLoginEmail" runat="server" Height="15px" Width="130px"></asp:TextBox>
        </div>

        <div class="f_password">
            <label for="txtLoginPassoword" id="labelPassword">
                Password
            </label>
            <br />
            <asp:TextBox class="text-input" ID="txtLoginPassword" runat="server" Height="15px" Width="130px" 
                TextMode="Password"></asp:TextBox>
        </div>
        <br />
        <div class="f_login">

            <!--src="../images/GreyButton.png"   class="submit btn primary-btn" onclick="btnLogin_Click"-->
            <asp:Button class="submit google-button" ID="btnLogin" onclick="btnLogin_Click" runat="server" Text="Log in" />                                       


            <br />

            <asp:CheckBox ID="chkRememberLogin" runat="server" />
            &nbsp;
            <label class="smaller" for="chkRememberLogin" id="labelrememberusername">Remember me
            </label>
            <br />
            <a title="Forgot your login info?" href="#" class="underlineHover">Forgot your login
                info? </a>
            <br />
            <asp:Literal ID="litErrorLogin" runat="server"></asp:Literal>
        </div>
    </div>
</div>
  • 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-06-11T10:07:55+00:00Added an answer on June 11, 2026 at 10:07 am

    You cna develop based on Ajax in order to don’t post all your page, but you post just part of your page. (Updates partial page)

            <asp:ScriptManager ID="ScriptManager1" runat="server" />
            <asp:UpdatePanel runat="server" id="UpdatePanel" updatemode="Conditional">
            <Triggers>
                <asp:AsyncPostBackTrigger controlid="btnLogin" eventname="Click" />
            </Triggers>
                <ContentTemplate>
                    <asp:Literal ID="litErrorLogin" runat="server"></asp:Literal>   
                    <asp:Button class="submit google-button" ID="btnLogin" onclick="btnLogin_Click" runat="server" Text="Log in" />                                       
    
                </ContentTemplate>
            </asp:UpdatePanel>
    

    You set all controls that you don’t want post outside of ContentTemplate

    Nota : i fixed updatemode="Conditional" and <asp:AsyncPostBackTrigger controlid="btnLogin" eventname="Click" />

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have a small issue: I created a drop down menu and a
I am getting this error only in chrome for superfish drop down menu. It
I have 2 div tags which emulate a drop-down menu. When the outer div
I've got a frustrating issue with Jquery auto-complete. I have UL of drop down
I have created two menus, a horizontal drop-down and a vertical menu, these both
I have a standard drop-down menu that uses jQuery to hide the children li
I have this issue trying to get all the text nodes in an HTML
I have this issue: first, I execute a SQL query using Java and then
I have this issue with ComboBox that uses IEnumerable<Brush> as ItemsSource; the problem lies
I have this issue, I'm have a user selected in LDAP through ldap search,

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.