Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
Register
| FAQ | Members List | 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 Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 18th, 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 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

  #2 (permalink)  
Old August 18th, 2006, 04:59 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 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?
  #3 (permalink)  
Old August 19th, 2006, 03: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.

 


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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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 09:58 AM
Accessing values from the last sibling node graywoodhouse XSLT 3 October 29th, 2004 06: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 05:13 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.