p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.

Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 18th, 2006, 05:23 AM
Authorized User
 
Join Date: Aug 2006
Location: Mostar, HNK, Bosnia and Herzegovina.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to hcusto
Default Accessing users profile values question?

Hi,
I am using asp.net membership provider, I have a Country profile field, and now I need to access it for all users (To see which users belongs to specified country).

How can i do that?

Thanx in advance,
Haris

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old August 18th, 2006, 05:59 PM
Imar's Avatar
Wrox Author
Points: 33,554, Level: 80
Points: 33,554, Level: 80 Points: 33,554, Level: 80 Points: 33,554, Level: 80
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 10,228
Thanks: 7
Thanked 203 Times in 201 Posts
Default

Hi Haris,

The ProfileProvider class has a GetAllProfiles method. As it name suggests, it returns all the available profiles.

Then you can loop through the results and look at each individual profile.

This is not very efficient, but currently you're pretty much limited to this, because of the awkward format that the data is stored in. This makes it pretty hard to write custom methods that query the aspnet_Profiles table.

You can take a look at the Table Profile Provider for a replacement of the current provider, making it easier to fire custom queries: http://www.asp.net/sandbox/samp_prof...ndex=0&tabid=1

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
While typing this post, I was listening to: Digital by Joy Division (Track 1 from the album: Heart And Soul (CD 1)) What's This?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old August 19th, 2006, 04:23 AM
Authorized User
 
Join Date: Aug 2006
Location: Mostar, HNK, Bosnia and Herzegovina.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to hcusto
Default

Thnks Imar,
I will read it for sure.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Prevent users from accessing the database window JAdkins Access VBA 1 February 2nd, 2008 03:10 PM
question about profile and global.asax hertendreef ASP.NET 2.0 Professional 0 January 24th, 2007 07:05 AM
accessing table values in VB pettrer ASP.NET 2.0 Basics 1 April 22nd, 2006 10:58 AM
Accessing values from the last sibling node graywoodhouse XSLT 3 October 29th, 2004 07:15 AM
Question about active directory users apalmero Access VBA 0 November 4th, 2003 03:13 PM



All times are GMT -4. The time now is 02:55 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc