Find my UserControl front-end code:
Welcome again
onclick="btnLoginClick_Click" />
Find my UserControl back-end code (VB, you may reply in c# too):
Dim sds As New SqlDataSource()
sds.ConnectionString = ConfigurationManager.ConnectionStrings("ConnectionString1").ToString()
Dim b As String = txtUserName.Text
Dim c As String = txtPassword.Text
sds.SelectParameters.Add("username", TypeCode.[String], b)
sds.SelectParameters.Add("password", TypeCode.[String], c)
sds.SelectCommand = "SELECT * FROM [users] WHERE [username] = @username AND [password] = @password"
Find my error:
Error: txtUserName and txtPassword is not declared.
What I use to access the controls placed under LoginView.
3 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

Suthish NairPosted May 13, 2011, 2:29 AM
The LoginView is a container control.
In order to access the control contained within it, you would first have to do a FindControl on the LoginView:
Suthish NairPosted May 13, 2011, 1:31 PM
Abhimanyu K VatsaPosted May 13, 2011, 3:52 AM
correct ans:-
can i ask for some tips plz.
(i) since how long you are familiar with c# and vb lang. (provide tips for me)
(ii) u always suggest correct, how? (provide tips for me)
(iii) are u professional coder?
please ??