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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T13:15:25+00:00 2026-06-06T13:15:25+00:00

I’m doing my first project based on ASP.NET Membership and I’m having issues with

  • 0

I’m doing my first project based on ASP.NET Membership and I’m having issues with figuring out how to relate my custom data to a specific member. What is the convention here?

For example I’m wanting to make a web app where people can vote on different things. To ensure that people don’t vote over and over again I’m wanting to track who has voted on what poll. (I’m providing an example of my intended use, but am mainly interested in a generic implementation)

Does anyone know of already written guides online or other good resources for this?

IF** it’s relevant, I’m using EF4 for my db access (I don’t directly need assistance with EF and/or db access only how the membership is related to other data). At the moment I’m planning on having the membership stored in MsSQL and the rest of the data in MySQL due to the space that GoDaddy gives me on each database.

  • 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-06T13:15:27+00:00Added an answer on June 6, 2026 at 1:15 pm

    You need to uniquely identify the currently logged in user. It’s most likely you’ll want to use MembershipUser.ProviderUserKey, which is the unique identifier provided by the particular flavor of MembershipProvider. In the case of SqlMembershipProvider, the value of this property is a Guid.

    So you can have a property on your vote record, like this (assuming you are using the SqlMembershipProvider):

    public class Vote
    {
        public Guid UserId { get; set;  }
        // etc.
    }
    

    You can get the current user’s ID like this:

    Guid userId = (Guid)Membership.GetUser().ProviderUserKey;
    
    Vote vote = new Vote { UserId = userId };
    

    Of course, from here you can query to make sure no Votes with UserId == userId exist before you create and save a new vote.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
We're building an app, our first using Rails 3, and we're having to build
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am doing a simple coin flipping experiment for class that involves flipping a
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I want to construct a data frame in an Rcpp function, but when I
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I'm making a simple page using Google Maps API 3. My first. One marker

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.