Ed
asked on
Adding Variable to FormView Textbox
Hi
Probably an easy one for you experts............
I've got some code that finds out what the current domain identity/Windoes user is and stores it as a variable.
I'm now trying to display this information in a textbox in a formview but it does not recognise the textbox name in the code as the textbox is part of a formview.
What I want to do it add the value of the variable 'authUserName ' to the textbox in the formview called TBMCUserTextBox
I have tried as you can see in that attached code but I just can't get it right.
Thnaks
Probably an easy one for you experts............
I've got some code that finds out what the current domain identity/Windoes user is and stores it as a variable.
I'm now trying to display this information in a textbox in a formview but it does not recognise the textbox name in the code as the textbox is part of a formview.
What I want to do it add the value of the variable 'authUserName ' to the textbox in the formview called TBMCUserTextBox
I have tried as you can see in that attached code but I just can't get it right.
Thnaks
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim authUserName As String
Dim aspUserName As String
Dim DomUser As Control = FindControl("TBMCUserTextBox")
authUserName = User.Identity.Name
aspUserName = Principal.WindowsIdentity.GetCurrent.Name
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.