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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:47:41+00:00 2026-06-10T14:47:41+00:00

I am making a web site using ASP.net, and i would like to make

  • 0

I am making a web site using ASP.net, and i would like to make a nice login popup with JQuery ModalDialog (Or ajax…i don’t know much about ajax). I have a database containing every allowed users, and I would like to close the popup if the user successfully logged in (If not, i want the popup to stay, and display an error message). The problem is that My validation is done serverside, and JQuery runs on the client side.

  • 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-10T14:47:43+00:00Added an answer on June 10, 2026 at 2:47 pm

    the easiest way is to make a jQuery ajax call from inside your dialog , then a webmethod in code behind that listens to this ajax , the webmethod will return successful login , or unsuccessful and you handle removing the dialog client side

    i’ll get some example code for you

            function fnValidateLogIn() {         
            $('#<%= lblLoginMessage.ClientID %>').text("");
            var email = $('#<%= txtEmail.ClientID %>').val();
            var pass = $('#<%= txtPass.ClientID %>').val();
            if (pass == "") {
                $('#<%= lblLoginMessage.ClientID %>').text("Please Enter A Password");
                return false;
            }
            else {
                $.ajax({
                    type: "POST",
                    url: "Login.aspx/LoginUser",
                    data: "{'email':'" + email + "', 'pass' : '" + pass + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (msg) {
                        var obj = $.parseJSON(msg.d);
                        if (obj.login == "failed") $('#<%= lblLoginMessage.ClientID %>').text("Login Failed");
                        if (obj.login == "success") {
                            location.reload(true);   //you can hide popup instead of refreshing
                            window.location = $('.hidden_url').text();  //you can hid popup instead of redirect 
                        }
                    }
               });
                return false;
            }
        }
    

    CODE BEHIND:

           <System.Web.Services.WebMethod(EnableSession:=True)> _
           Public Shared Function LoginUser(email As String, pass As String) As String
    
            'code to validate user
    
           return "{ ""login "" : ""success"" }"  'example
    

    THat is in VB.Net , but you can get the idea

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

Sidebar

Related Questions

I've rewritten my family web site using JavaScript (JQuery) making Ajax calls to PHP
I have been making a web site with a cart in asp.net using visual
I have simple jQuery Mobile site created using asp.net mvc 2 and uses basic
I am making a web site targeted at mobile phones and would like to
I am making a webapp, using ASP.NET, C#, and jQuery with 4 tabs, and
So I have an ASP.NET web site (not web application) I'm making in VS2010
I am making a Multilingual Website with ASP.NET using visual studio 2008. In my
i am making a website using asp.net and C# and well i got stuck
I'm working on ASP.Net MVC3 web-site with Entity Framework and SQL Server 2008 as
I have a site written in Asp.net webforms. It uses ajax heavily. Most forms

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.