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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:34:31+00:00 2026-06-08T03:34:31+00:00

When the user clicks on the paybill (secure page) option, he/she is prompted to

  • 0

When the user clicks on the paybill (secure page) option, he/she is prompted to log-in & then be redirected to the account page. I am using Page.ResolveUrl in the Login_Authenticate method. Once logged in, if the user navigates to any different page on the website & then clicks on paybill again, I check the Identity.IsAuthenticated status in the page load and depending on this I again redirect the user to the account page. I want to know if this is the right way or if there are any best practices for doing this as this involves a lot of server calls. Can I do this functionality using the LoggedInTemplate in the asp:LoginView or Javascript? I have the code for your ref…

protected void Page_Load(object sender, EventArgs e)
{
    //to directly link user to account if it's authenticated
    var userauth = System.Web.HttpContext.Current.User.Identity.IsAuthenticated;
    if (userauth)
    {
        string urlredirect = Page.ResolveUrl("~/" + SiteConfig.PageMappings["ACCOUNT"]);
        Response.Redirect(urlredirect);
        Server.TransferRequest(urlredirect);
    }
}
  • 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-08T03:34:32+00:00Added an answer on June 8, 2026 at 3:34 am

    You don’t need to do both the Redirect and the TransferRequest. Response.Redirect sends a 302 to the browser to tell it to access a new page. Server.TransferRequest causes the request to be handled in a different Page within the existing request. If you’re doing authentication, you likely want to scrap the current session and start over, which means just using Response.Redirect. I use Response.Redirect in circumstances like this. I also think it’s useful for the user to see they’ve been redirected to another page for login (as well as being useful for page caching and back/forth navigation in the browser. w.r.t to authentication and login).

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

Sidebar

Related Questions

Whenever the user clicks logout button he is redirected to login page then he
When user clicks hyperlink on my ASP.NET page, I want a new browser to
User clicks on Remote button and then the following UITableViewController loads up: The user
A User clicks on 'View Users' and the php logic fetches the data using
When the user clicks on the button with id=cancel , they are redirected to
When the user clicks a button on my JSP page this launches a struts
If the user clicks on a button, I set myVar = true, then show
When the user clicks a button, I want to build a string, then have
1) User clicks 'Login with facebook' 2) Redirect the user to http://www.facebook.com/dialog/oauth?client_id=xx&redirect_url=xxx&etcetc 3) User
Once the user clicks an anchor tag I need to open a page in

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.