I have edited the createuserwizard to have some extra textboxes, dropdownlists etc
I wish to get the values of these objects.. I use the code below to retrieve it and test to see if i have the correct value by outputting it into a Msgbox!
I have also tried the code that is commented out but when i do either of the two i get the same error. I dont understand this as its the same code as finding a control within a LoginView or any container..
This is the code i am using
//BEGIN
Protected Sub Button2_Click1(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
' ' 'Dim user as String = CType(CreateUserWizard1.FindControl("UserName"), TextBox).Text
' ' 'Msgbox(user)
MsgBox(CType(CreateUserWizard1.FindControl("UserName"), TextBox).Text)
End Sub
//END
Just to prove this works with the Login View below is the code i would use to get the text property of a textbox within a login view:
//BEGIN
CType(LoginView.FindControl("TextBox1"), TextBox).Text
/END
TO HELP YOU UNDERSTAND WHAT IM TRYING TO DO HERE A A FEW PICTURES:
This is a picture of my control:
Now for now i am just trying to get the text property out of ScreenName because once i do this i will be able to do it for the rest.
Here is a picture of my error:
This is the error i get which doesn't really make sense to me. But i guess it says that it cant find the control (let me know if this is incorrest)
Please help as im sure there is a very simple solution but have been trying to figure it out now for over an hour..
Your help is appreciated...
Thanks
I wish to get the values of these objects.. I use the code below to retrieve it and test to see if i have the correct value by outputting it into a Msgbox!
I have also tried the code that is commented out but when i do either of the two i get the same error. I dont understand this as its the same code as finding a control within a LoginView or any container..
This is the code i am using
//BEGIN
Protected Sub Button2_Click1(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
' ' 'Dim user as String = CType(CreateUserWizard1.FindControl("UserName"), TextBox).Text
' ' 'Msgbox(user)
MsgBox(CType(CreateUserWizard1.FindControl("UserName"), TextBox).Text)
End Sub
//END
Just to prove this works with the Login View below is the code i would use to get the text property of a textbox within a login view:
//BEGIN
CType(LoginView.FindControl("TextBox1"), TextBox).Text
/END
TO HELP YOU UNDERSTAND WHAT IM TRYING TO DO HERE A A FEW PICTURES:
This is a picture of my control:
Now for now i am just trying to get the text property out of ScreenName because once i do this i will be able to do it for the rest.
Here is a picture of my error:
This is the error i get which doesn't really make sense to me. But i guess it says that it cant find the control (let me know if this is incorrest)
Please help as im sure there is a very simple solution but have been trying to figure it out now for over an hour..
Your help is appreciated...
Thanks