I have one sharepoint site in which FBA was enabled. I am trying to show all the registerd users in a grid. Along with the username and password i want to show some custom properties like company and Mobile number also. We can set custom profile properties in asp.net. How to work with sharepoint by using those profile properties. I am creating visual webpart to display all the users. In that i am writing like below,
Membership.CreateUser(username, newpassword, Email);
var profilebaseobj = ProfileBase.Create(username, true);
profilebaseobj.SetPropertyValue("Company", company);
My visual webpart looks like below. Here I am taking company name and mobile as static values, Not from database.
When i debug, it is giving me error stating that, unable to connect the database. Should we need to specify any database here? Is there any otherway to add custom profile properties to the sharpeoint fba user? Can any one give me the solution please!!