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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:25:57+00:00 2026-05-27T13:25:57+00:00

In a web application which I found it has been decided the user must

  • 0

In a web application which I found it has been decided the user must have logged in or registered as a new user before they can either view the shopping cart or place an item in it. So if the user selects an item to add to the cart and they are not logged in, they must be forced to login or register. My question is, what is the main approach to handling this situation in ASP.NET?

  • 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-27T13:25:58+00:00Added an answer on May 27, 2026 at 1:25 pm

    I don’t think it’s a good idea (business wise) to only allow the addition of items to cart if the users are logged in, but I leave that to you.

    The approach you need to take depends on your specs which aren’t 100% clear. I assume your catalog and product pages are public accessible and I expect you want the user to login in with his credentials and also add the item to the cart and then go back to the product page as well?

    A use-case of what you want could be the following:

    1. If the user clicks on add item to cart, do a postback and check if the user is logged in and – if so – add the item (use-cases ends) otherwise redirect to the login page add remember (session, querystring, cookies) the item you want to add.

    2. User enters credentials and the system checks if there is a pending item to add and – if so – adds the item to the cart.

    3. The system redirects the user back to the product page.

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

Sidebar

Related Questions

I have a Spring framework based Java web application, which has been built in
I am developing a web application which has Chart Controls. I have developed a
I have created a new MVC2 project using the ASP.NET MVC2 Web Application, which
I have a PHP web application which uses a MySQL database for object tagging,
I have a web application which provides Excel files via IE 7. It requests
I am creating a web application which has a few management screens, where a
I have web application which we deployed in a production . We have separate
I've been looking into a legacy application with a web-based user interface. Given its
I have a web application which is used by lots of non-technical users. I
I have been writing a small web application in C# .NET4.0 to try and

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.