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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T18:01:34+00:00 2026-05-21T18:01:34+00:00

I have a website with a lot of static HTML pages. There are also

  • 0

I have a website with a lot of static HTML pages. There are also some aspx pages in the site. We are using Forms Authentication with standard login controls and the default ASP.NET authentication provider to control user access. Only the aspx pages have their access or functionality controlled by who is logged in. The HTML pages are all open to the public.

However, we’d like to be able to show users who are logged in that they are logged in, even on the static HTML pages. We’ve got a link in the top right corner of the HTML pages to take the user to the login.aspx page. Is there any way to change this link, using jQuery or something similar so that users who are authenticated see their login name or even a link that logs them out? Ideally we’d like to show them their login name as a link that logs them out.

If this is possible, does anyone have an example of the code to do this that they can share?

  • 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-21T18:01:35+00:00Added an answer on May 21, 2026 at 6:01 pm

    It’s definitely possible, here’s an overview of the solution I’d use:

    I’d use the jquery.ajax function to hit an asp.net generic handler (.ashx) page. There are plenty example of this on the web but as a quick example:

        $.ajax({
            type: 'POST',
            url: myServerSidePage.ashx,
            success: function (data) {
                //update link here
            }
        });
    

    Then on the myServerSidePage.ashx I’d have a method along the lines of:

        public void ProcessRequest(HttpContext context)
        {
            context.Response.Write(Membership.GetUser().UserName);
        }
    

    You’d obviously need some error checking around both the server side and ajax call as well.

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

Sidebar

Related Questions

I've a website composed by some .asp file and a lot of static .html
I have a high traffic website with a lot of static content. It is
If I run a website that contains a lot of static HTML code +
I have a website which has a lot of combo boxes and auto-complete textboxes
I have a website which displays a lot of photos, built with asp.net and
I have a website where I cache a lot of info. I am seeing
I have searched a lot about the difference between Website and WebApplication but didn't
For a website, I will have a lot of auto complete fields on differents
I have a web site project with a lot of files, it has become
I have a website written in-house, using a 3rd party login mechanism. Recently we've

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.