current username for FBA user - InfoPath Dev
in

InfoPath Dev

current username for FBA user

Last post 11-01-2011 05:47 AM by brandtsmith. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-26-2011 11:23 AM

    current username for FBA user

    Has anyone figured out how to retrieve the current username for an FBA user in IP2010
    Filed under: , ,
  • 11-01-2011 05:47 AM In reply to

    Re: current username for FBA user

    OK..I figured it out...have to use fully trusted forms...might as well use administrator approved forms as well so you dont have to mess with certificates...and use some code like this:

    int index = 0;
    userName = (this.Application.User.LoginName);
    if (userName.Contains("sqlmembershipprovider"))

    {
          index = userName.IndexOf("sqlmembershipprovider|") + 22;
          userName = userName.Substring(index, userName.Length - index);
    }



     

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.