.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

Getting LastName From Aspnet_Profiles

Posted By:      Posted Date: September 10, 2010    Points: 0   Category :ASP.Net
Hello forum I've got a dropdownlist(ddlUsernames) with username values and a textbox (txtLastName) which I intend to display the lastname, from aspnet_profiles, that is related to the selected Username.  How do I go about? Thank you.

View Complete Post

More Related Resource Links

How to order by LastName when using GridView and ObjectDataSource?


I have a GridView setup using ObjectDataSource to GetAllUsers, but it's automatically ordering by UserName.  How can I get this to automatically order by LastName?

<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False" DataSourceID="allUsersDataSource" >
                <asp:TemplateField HeaderText="Last Name">
                        <asp:Label ID="LastNameLabel" runat="server" Text='<%#Profile.GetProfile(Eval("UserName").ToString()).LastName%>' />

Sharepoint Outlook Public Contacts Firstname Lastname Not Updating Correctly


Users using Outlook 2007 Sharepoint public contacts have been having problems where firstname lastname have amalgamated into lastname.

First Name John
Last Name: Doe

Appears as

First Name:
Last Name: John Doe

I had the user change the first name/last name within Outlook Sharepoint public contacts but this does not reflect the change in other users Outlook contacts.

e.g. User 1 (Outlook 2007) modifies existing contact to

First Name: John
Lastname: Doe

User 2 see's

Search via SN (lastname) not working


I have created a program that will search our companies AD and bring back the results.  I have been successful in searching via samaccountname and givenName, but when I attempt a lastName search it doesn't bring anything back.

These work:

oSearcher.Filter = ("(&(objectClass=user)(givenName=" & firstName & "))")

oSearcher.Filter = ("(&(objectClass=user)(samaccountname=" & logonuser & "))")

But this one does NOT:

oSearcher.Filter = ("(&(objectClass=user)(sn=" & lastName & "))")

Any ideas?

Thanks in advance!

Users display as "domain\username" rather than "firstname lastname"


Hi All,

     In my new 2010 setup, I see domain\username instead of their firstname lastname in the top-right-hand corner. How and where can I set up to show firstname lastname. I apprciate your response.



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend