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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:28:42+00:00 2026-05-16T18:28:42+00:00

I m using the Asp.net membership provider with my web application ! I would

  • 0

I m using the Asp.net membership provider with my web application !

I would like to know how to get the user ID and How and Where can I add code to the application to set same session variable On the User log on !
This is the scenario :
The user Logon,
I catch his ID an the database
I execute some query to set same session variable with data in relation with this user : Like name and other stuff from other table in relation with the user table !
According to user data(role and other stuff), I redirects it to his own view or page.

Thank you for helping me !

PS :The membership system are using his own database : ASPNETDB.mdf !
PSS: I m using C sharp !

  • 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-16T18:28:42+00:00Added an answer on May 16, 2026 at 6:28 pm

    Membership.GetUser().ProviderUserKey is what you’re looking for. Why do you want to store it in Session?

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

Sidebar

Related Questions

I'm building a web application using the ASP.net Membership Provider to manage, Authentication/Authorisation. I've
I have one asp.net web application. It is using two membership provider. Two sign-in
I have a Web Role that is using the ASP.NET SQL Membership provider. Currently
I have an ASP.NET 3.5 Web Site using the standard SQL Membership Provider. The
I am using asp.net forms authentication, membership provider and role provider. You can refer
Example scenario in an ASP.NET application using SQL Server membership provider : 1) a
I am using ASP.NET 4.0 membership api in web form application. I want to
I have inherited an application that uses the ASP.NET membership provider for user management.
I am using asp.net 2.0. I have been using asp.net membership provider for user
I am using the ASP.NET membership provider controls (ChangePassword and PasswordRecovery) and they generally

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.