get current user logon using c#.net

J

Jermaine Cross

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;
}
}
}
 
A

Ameet Phadnis(e Tek Global Inc.)

Check the trust level on the form. I think that might be the issue with this
code.
 
J

Jermaine Cross

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top