473,395 Members | 1,496 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Bind to MembershipUserCollection Names?



I want to bind a DropDownList to the names in a
MembershipUserCollection. How can I do that, sorting the names
alphabetically?

Using ASP.NET 2.0. Thanks.


Feb 28 '06 #1
1 2388
Hello xenophone,

To get a list of the membership names and databind to a DropDownList how
about:
=-=-=-=-
ddlMembers.DataSource = Membership.GetAllUsers();
ddlMembers.DataBind();
=-=-=-=-

The names should be sorted alphabetically. You can tell be looking at the
stored procedure aspnet_Membership_GetAllUsers. In the select statement there
is an ORDER BY u.UserName clause.

--
brians
http://www.limbertech.com
"xenophon" wrote:


I want to bind a DropDownList to the names in a
MembershipUserCollection. How can I do that, sorting the names
alphabetically?

Using ASP.NET 2.0. Thanks.


Feb 28 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Andreas Thiele | last post by:
Hi, I'm very new to php. In my current code I'd like to bind variables to the values of a simply (only indexed by numbers http://www.php-center.de/en-html-manual/language.types.array.html])...
1
by: caroline_dion | last post by:
Hi, We are pre binding to a test database, and we want to bind to another database. We are using DB2 version 8. We are using a user called MCJ100D to prebind. We are using MIJ100D to bind; i.e....
3
by: AFN | last post by:
In VB.NET, I can successfully bind a generic datagrid to a 1 dimensional array. But, now I want to add a button column, and so I think I need to make the first column (the one having data in the...
2
by: Jim in Arizona | last post by:
Being new, i experiment a lot and usually get results I'm not hoping for. My current problem is reading from a SQL 2000 table and populating an ASP dropdownlist with a column from the table. The...
7
by: Peter Afonin | last post by:
Hello, I have a code that queries Active Directory and put logins and names into the ArrayList. Then I need to bind this ArrayList to the DropdDownList, making names as DataTextField and logins...
2
by: Gert Van den Eynde | last post by:
Hi all, I have a template class template<typename TC> class A{ public: ... protected: TC ObjTC; }
2
by: Justin Drerup | last post by:
I'm tryng to return a custom object that contains a collection of MembershipUsers through a web service however I receive the following error when trying to return the object through a web method:...
6
by: Jeff | last post by:
ASP.NET 2.0 This is a generic class List<Contactcontacts = Contact.GetContacts(profile.UserName); Every Contact object holds info about a UserName from aspnet_Users. So Contact.GetContacts...
0
by: Bogdan | last post by:
Hi, Can a GridView bound to a MembershipUserCollection sort its content? For example, can the GridView"s rows be sorted by UserName? If yes, could someone point me in the right direction? ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.