ASP.NET Membership - Need to add custom fields to admin screens?

If not, then you will need to do so If so, you will need to cast the results from Membership, as it's return type is a stock Membership user, even if you are returning a derived type something along the lines of Users. DataSource = Membership.GetAllUsers().Cast().

If not, then you will need to do so. If so, you will need to cast the results from Membership, as it's return type is a stock Membership user, even if you are returning a derived type. Something along the lines of.. Users.

DataSource = Membership.GetAllUsers().Cast().

That seems really messed up. There is no easier way? Thank you for all your help, I am just a little frustrated as I wish to better understand this.

– Steve May 25 '10 at 14:55 @steve - Well, daniel proposes using profiles, which I agree with in some cases, depending on the volitility and sensitivity of the extra data. It would help clear things up if you describe the type of fields you want to associate with the user and why you chose membership over profile in the first case. – Sky Sanders May 25 '10 at 15:01 I need just one or 2 fields.

1 is Customer Name and another is a value to represent the days that the password is valid for. I chose the Membership because I started coding it that way.No other reason as I am really new to all this. – Steve May 25 '10 at 15:58 @steve - Well, the customer name is a candidate for profiles, but anything related to the password is not and should be stored with the password as membership data.

So you might as well throw the other field in as well, as it will be less work. – Sky Sanders May 25 '10 at 16:01 @steve - get ready for another adventure and follow the link in my answer (msdn.microsoft. Com/en-us/library/ms366730.

Aspx). – Sky Sanders May 25 '10 at 16:03.

Edit: Don't modify the stored procs or the tables created with the membership provider. This is asking for trouble. What you need to do is add a Profile Provider, which extends the standard user information.

Original Answer: Have a read of this article by Scott Guthrie: weblogs.asp.net/scottgu/archive/2006/01/... It is about the Table Profile Provider, which is a lot better than the out of the box one. This one too: weblogs.asp.net/scottgu/archive/2005/10/....

I recognize your intent but you are in no way addressing the problem as state, Daniel. Sorry- -1. – Sky Sanders May 25 '10 at 14:20 The problem as stated is that they want to associate a Company Name with the user's login.

The ProfileProvider is the standard asp. Net way to do this if you are already using a membership provider. They go hand in hand.

– Daniel Dyson May 25 '10 at 14:32 You can wax revisionist all you like, daniel, it doesn't change the fact that your initial answer was a non-sequitur. The advise you later added is valid but don't pretend that you came off the block with a cohesive answer. – Sky Sanders May 25 '10 at 14:42 And if you believe that there is no scenario in which it makes sense to add custom fields to membership as opposed to profile, you are mistaken.

If you are going to point a questioner in the opposite direction of their clearly stated requirements you should provider more than a 'dont do that'. – Sky Sanders May 25 '10 at 14:47 Fair enough. I don't quite understand your english, but I have updated my post to reflect the changes that I made from the original.Is this ok?

– Daniel Dyson May 25 '10 at 14:48.

Edit: Don't modify the stored procs or the tables created with the membership provider. This is asking for trouble. What you need to do is add a Profile Provider, which extends the standard user information.

It is about the Table Profile Provider, which is a lot better than the out of the box one.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions