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

  • Home
  • SEARCH
  • 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 640361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:56:41+00:00 2026-05-13T20:56:41+00:00

i have a doubt on how to show a popup???` if (machineID.Count != 0)

  • 0

i have a doubt on how to show a popup???`

   if (machineID.Count != 0)
            { 
           checkMachineGrpState(machineID);
            }

            else
           {
                FormsAuthentication.SignOut();
                Session.Abandon();
                Response.Redirect("~/Default.aspx");
            }

Ok now what im am doing in else statement is signing out the user and sending him back to the log out page….
I need to how him some pop up message that he is being signed out i cant figure out how to do that…
i tried messagebox but it wont work with servver and client side..
I want to use AJAX but dont know how…
any suggestions…. 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-05-13T20:56:41+00:00Added an answer on May 13, 2026 at 8:56 pm

    There are a couple of different ways you can go about this. Here’s a simple example.

    Your Default.aspx page will need to display the message to the user when they’ve logged out, so you might want a way to distinguish when you want to show the message. You could add a query string param to your redirect, like:

    Response.Redirect("~/Default.aspx?ShowLogout=true");
    

    Now on your Default.aspx page, you have a number of options. You could simply show a hidden control on the page, or write out some Javascript to show an alert box:

    if (!String.IsNullOrEmpty(Request.QueryString["ShowLogout"]))
                    ClientScript.RegisterStartupScript(this.GetType(), "LogoutMsg", "<script>alert('You have been logged out.');</script>");
    

    This will simply write out a script tag that runs when the user views the page. From here, you can make it more elegant by showing the user a better dialog box. For example, you could use jQuery to create a nice looking dialog box, and call the Javascript function to show it rather than calling alert in my example.

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

Sidebar

Related Questions

I have a doubt here, I need to show a pie-chart in SSRS, for
I have doubt when i am reading difference resource for Proxy fetching or No-proxy
Possible Duplicate: What is the difference between const and readonly? i have doubt in
I have a doubt about orkut's new URL Writing method. Earlier the home page
I have one doubt regarding casting. public void Test(out T a, out T b)
I have a doubt in layouts.I have designed one layout using group layout using
I have one doubt in string . How can we acess the memory of
I have a doubt regarding the backlog value in listen system call. From man
i have a doubt in grid view. In Data list we have a property
I have doubt whether we can do the following or not. Suppose I have

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.