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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:50:12+00:00 2026-05-23T03:50:12+00:00

I have an MVC3 application and I would like to give the users the

  • 0

I have an MVC3 application and I would like to give the users the ability to set preferences that would be enabled when the user logs in.

I really don’t have any idea where to start with this and would really appreciate being pointed in the right direction. I did try some changes to the membership class but now I am thinking that’s probably not the best way to go about things.

  • 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-23T03:50:13+00:00Added an answer on May 23, 2026 at 3:50 am

    You could do it in a database (sounds like you might be using one at least with the out-of-the-box membership provider) once uniquely identifying a user. In that case, you may want to implement your own membership provider.

    You have to do a little work to start implementing your own provider. If this is your only requirement, you might be able to avoid it by writing your own class that returns settings in a format of your choosing

    public static class UserSettings
    {
        public static string GetSettings(IPrincipal user)
        {
            if(user.Identity.IsAuthenticated)
            {
                // dip into database using user.Identity.Name property
                return "string with user settings";
                // this also assumes user.Identity.Name is uniquely able
                // to identify a user in your database!
            }
    
            return string.Empty;
        }
    }
    

    Or, if the information is completely trivial, maybe you could implement a cookie representation of the user settings. This, of course, comes with all the caveats of using cookies, but you could avoid storing the information in a database

    Anywhere you have an HttpContext you could grab the settings value like so:

    if(HttpContext.Current != null)
    {
        string userSettings = HttpRequest.Current.Request.Cookies["NameOfCookie"];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following class that's used by my MVC3 application. I would like
I'm building an MVC3 application and would like to have a form with a
I am designing an ASP.NET MVC3 application, and I would like to have a
In an ASP.NET MVC3 application I have a function that looks like: Public Sub
I have an ASP.NET MVC3 application that I have built and it has two
I have a ASP.NET MVC3 application that handles time-consuming processes (copying a large file
i have created an mvc3 web application that uses forms based authentication. one part
MVC3 vb.net Application using built in session management. I have an mvc3 application that
MVC3 VB.NET application using Itextsharp. I have a section of code that generates a
I have an MVC3 application with Razor and I created a View that inside

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.