I want to pass an asp.net membership user name to a subroutine and retrieve t开发者_Python百科he profile property named FullName for that user, how can i achive this in vb.net?
Thanks in advance.
this is off the top of my head and my vb.net is rusty so treat it like psuedo code that may run as-is
Public Function GetProfileFullName(username as String) as String
Dim profile as ProfileBase = ProfileBase.Create(username);
Return profile.GetPropertyValue("FullName") as String;
End Function
you need to extend the ASP.NET Membership API for this.
follow this article to see how: http://www.code-magazine.com/article.aspx?quickid=0703071
精彩评论