How to access ASP.Net user information from a colelction
Posted on 2007-12-03
I have a list box that needs to display a list of users (all, not just logged on). In the panel on the right hand side I want to display the data (eg email address) related to the current user.
this.UsersListBox.DataSource = allTheUsers;
(1) Is this the correct way to do it?
(2) Having bound the collection to the listbox, how do I display only the username?
(3) How do I get the value of (for example) the EMail field of the currently selected user?
(4) If I add/delete a user, do I do another GetAllUsers()? Is this acceptable? Is there a better way?
In advance, thanks!