Filtering datas by user / retrieving UserID and make use of it

Last post 11-06-2007 11:53 AM by norchnou. 2 replies.

Sort Posts:

  • Filtering datas by user / retrieving UserID and make use of it

    11-04-2007, 5:35 PM
    • Loading...
    • norchnou
    • Joined on 01-07-2007, 8:41 PM
    • Posts 230

    Hi all,

    I am using the default ASPNET membership provider.

    I have added 1 table called profile to store in some user infos.

    My first question will be to know how to link them with the primary Key and foreign key.

    The UserID in the users table seam to be encrypted so before running into the trouble I prefer to ask.

    (please dont tell me to go on 4 guyz from rolla...)

    Now let say I figure this out which is not the case.

    I want to filter some datas depending on the user him self not the role where he belongs to.

    I guess I need to make in my SQL statement " WHERE UserID = @UserID.

    but then how can I retrieve this UserID from the user which is logged on.

    I've tried session but... did not work.

    Anyway, any help will be appreicated.

    Thanks 

     

  • Re: Filtering datas by user / retrieving UserID and make use of it

    11-05-2007, 2:17 AM
    • Loading...
    • dotsad
    • Joined on 04-25-2007, 9:52 PM
    • Seattle, WA
    • Posts 67

    Hi, look into

    Roles.IsUserInRole

    and

    User.Identity

     

     

    Please mark my answer as correct if it was correct.

    my blog with .NET hints seattle-khv.spaces.live.com
  • Re: Filtering datas by user / retrieving UserID and make use of it

    11-06-2007, 11:53 AM
    • Loading...
    • norchnou
    • Joined on 01-07-2007, 8:41 PM
    • Posts 230

    You means that I should look into these table.... to find the right user ID?

Page 1 of 1 (3 items)
Microsoft Communities
Page view counter