Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / October 2006

Tip: Looking for answers? Try searching our database.

get current user logon using c#.net

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jermaine Cross - 24 Oct 2006 18:05 GMT
the code below is what i researched and found on the net that should work,
but its not. i am not getting any errors but the current user logon name
still does not appear in the text box. can someone help me. thanks!

public void OnLoad(DocReturnEvent e)
        {
            // Populates UserName in field.
            IXMLDOMNode UserNameNode =
thisXDocument.DOM.selectSingleNode("dfs:myFields/dfs:mydataFields/d:UserName");
            if (UserNameNode!=null)
            {
                if (UserNameNode.text=="")
                {
                    UserNameNode.text = System.Environment.UserName;
                }
            }
        }
Ameet Phadnis(e Tek Global Inc.) - 24 Oct 2006 23:33 GMT
Check the trust level on the form. I think that might be the issue with this
code.
Signature

Ameet Phadnis
Sr. Technical Consultant
e Tek Global Inc.
ASP Alliance Author Page: http://aspalliance.com/author.aspx?uId=44260

> the code below is what i researched and found on the net that should work,
> but its not. i am not getting any errors but the current user logon name
[quoted text clipped - 13 lines]
>             }
>         }
Jermaine Cross - 24 Oct 2006 23:44 GMT
Everytime I try to change the trust level to full and attach my CA it gives
me an error that the CA is corrupt. I got the CA issued twice and placed it
in the Trusted Root.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.