Passing userid into textbox in FormView - ASP.NET Forums: "Hi twenty,
Try to do it in DataBound event of FormView:
Protected Sub FormView1_DataBound(ByVal sender As Object, ByVal e As EventArgs)
If FormView1.CurrentMode = FormViewMode.[ReadOnly] Then
Dim UserID As String
Dim MemUser As MembershipUser
Dim tb As TextBox = DirectCast(FormView1.FindControl('UserIDTextBox'), TextBox)
MemUser = Membership.GetUser()
UserID = MemUser.ProviderUserKey.ToString()
tb.Text = UserID
End If
End Sub
Thanks,"
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.