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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:28:35+00:00 2026-06-13T12:28:35+00:00

I have code of Jquery login control loke following using this into asp.net but

  • 0

I have code of Jquery login control loke following using this into asp.net but but confused where and how I can simply authenticate username and password.

Login.aspx

<head>
    <link href="css/style.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="Scripts/login.js" type="text/javascript"></script>
</head>

 <div id="loginBox">                
                    <form id="loginForm">
                        <fieldset id="body">
                            <fieldset>
                                <label for="email">Email Address</label>
                                <input type="text" name="email" id="email" />
                            </fieldset>
                            <fieldset>
                                <label for="password">Password</label>
                                <input type="password" name="password" id="password" />
                            </fieldset>
                            <input type="submit" id="login" value="Sign in" />
                            <label for="checkbox"><input type="checkbox" id="checkbox" />Remember me</label>
                        </fieldset>
                        <span><a href="#">Forgot your password?</a></span>
                    </form>
                </div>

Login.js
// Login Form

$(function() {
    var button = $('#loginButton');
    var box = $('#loginBox');
    var form = $('#loginForm');
    button.removeAttr('href');
    button.mouseup(function(login) {
        box.toggle();
        button.toggleClass('active');
    });
    form.mouseup(function() { 
        return false;
    });
    $(this).mouseup(function(login) {
        if(!($(login.target).parent('#loginButton').length > 0)) {
            button.removeClass('active');
            box.hide();
        }
    });
});

Now How could I use my asp.net authentication with this Jquery code ?
where and how to write c# authentication code?
give some threads also m new bie in jquery
thanks

  • 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-13T12:28:37+00:00Added an answer on June 13, 2026 at 12:28 pm

    I’m not sure what are you trying exactly to do, but in order to perform log on with asp.net you should send your data somehow to the server. You can do it in two ways: send it with form or by AJAX request. If you want to send it within the form, you should specify action in your tag form, e.g.

    <form id="loginForm" action="MySite/Logon">
        <!-- fields, labels, etc. -->
    </form>
    

    If you want to send it via jQuery AJAX request, you can use jQuery.ajax method, which is clearly explained here, with corresponding url in url parameter.
    On the server side, your authentication may look like this:

    FormsAuthenticationTicket ticket = new FormsAuthenticationTicket( // create authentication ticket
        1, // id
        email, // user name
        DateTime.Now, // date of issue
        DateTime.Now.AddMinutes(15), // expiration date
        true, // true if your ticket will be stored in a cookie, that will be kept by browser across the sessions
        userdata, // any text data, that you want to add to ticket (e.g. user roles)
        FormsAuthentication.FormsCookiePath // path associated with your ticket
    );
    string hashedTicket = FormsAuthentication.Encrypt(ticket);
    HttpCookie cookie = new HttpCookie(
        FormsAuthentication.FormsCookieName, hashedTicket); // adding your ticket to cookie
    cookie.Expires = ticket.Expiration;
    Response.Cookies.Add(cookie); // sending cookie to client with current response
    

    After these actions, your client will be recognized as authenticated until he logs off or expiration time of cookie/ticket expires.
    Hope this info will help you.

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

Sidebar

Related Questions

I am using jQuery Address Plugin and I have the following code. $.address.change(function(e) {
i have a jquery login drop down I use this code to show the
I have this JS code (using jQuery Form plugin): function doLogin(responseText, statusText, xhr, $form)
I have this code: jQuery: var mouseDown=false; var lastPositionX; var lastPositionY; var newX; var
OK i have this code HTML: <html> <head> <script type=text/javascript src=http://code.jquery.com/jquery-1.7.1.min.js> </script> <script type=text/javascript>
Ok, I have this code: <html> <head> <script type=text/javascript src=http://code.jquery.com/jquery-1.7.1.min.js></script> <script type=text/javascript> function get()
I have jQuery code which looks something like this on Button1 Click $('table.result_grid tbody
I have code that uses jquery.slideup and jquery.slidedown How can i know that div
i have some code using jquery mobile + phonegap and run it on my
I have this code in jquery : $(#order_btn).click(function(){ var totalprice = $(.price_amount).text(); $(#totalprice).val(totalprice); });

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.