ashok kumar

ashok kumar

  • NA
  • 3
  • 0

how to add custom profile properties without using web.config?

Nov 19 2008 1:47 AM
i have my own table say tblProfileProperty which lists all properties that I want to use with the profile like BirthDate,Country,City....

This is so that Admin can directly add any dynamic property at any time, which will /should be available to users the next time they log on and can save their user specific property value. 

Also have another table user profile properties where corresponding property values of user profile are to be saved. 

I have created my custom profile provider, but the problem is that if i don't add all properties that are there in the tblprofileproperty table which I want to use to the web.config profile section under <properties> tag, they give me exception that 'property not found'.  If I put them there, I'm able to use it.

 Also I can't just create custom class with property get set methods, as it can be changed by the admin as and when need arises for the new property.

I was thinking it would be nice to have some interface for admin to add properties as needed, which next time user can have and utilize it. Whenever feels like, admin can remove the property and it won't be available to users the next time they log in. 

Any workaround for this problem? any help would be appreciated. thanks


Answers (1)