Click here to Skip to main content
15,889,900 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to build a website where a group of people will join. They will have their own profile and other related things. I want to implement custom membership and profile providers to them in such a way that one member can search and view profile of each other based on the records entered by him/her.
I have followed this to implement custom profile class. Now the thing is that it has a get and set blocks. Inside the get and set block I planned to set and get the properties via my custom SQL query. However I am facing a problem which is how can I get the current logged in user?(to pass for example an employee id in the where clause of the SQL query).
I want to implement it via custom providers because the built in ASP.NET Provider for Profiles does not facilitate searching over the properties (if it is available I am unaware)
I would be glad if anybody could help me in solving this problem. Thanks in advance.
Posted
Comments
[no name] 4-Mar-12 19:20pm    
What have you tried so far?
Pankaj Nikam 13-Mar-12 4:50am    
Still searching for the profile part of the question.

Try this site dude for your custom membership provider; this also includes custom role provider.

http://www.brianlegg.com/post/2011/05/09/Implementing-your-own-RoleProvider-and-MembershipProvider-in-MVC-3.aspx[^]
 
Share this answer
 
v2
Comments
André Kraak 13-Mar-12 2:51am    
Edited solution:
Activated link
Pankaj Nikam 13-Mar-12 4:49am    
Yea the solution is fine except for the scenario I listed which is I have to implement ASP.NET profile for my site and I want to enable users to search based on the profiles filled in by the users.
Have you seen this article:
[here]
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900