Hi, I was creating a webform and I got one error and I don't know what does it means can anyone help me with it
The Error: Reference to a non-shared member requires an object reference.
The underline and bold line.
My login Page:
Username:
<asp:TextBox ID="UserID" runat="server">User1</asp:TextBox>Try
If s.Connected Thens.Send(bytesSent, bytesSent.Length, 0)
Dobytes = s.Receive(bytesReceived, bytesReceived.Length, 0)
receiveText = Encoding.ASCII.GetString(bytesReceived, 0, bytes)
receiveXMLText = receiveXMLText + receiveText
If receiveText.IndexOf("</packet>") ThenquitRequest =
TruereceiveXMLText = receiveXMLText &
"</packet>" End If 'Application.DoEvents() Loop While quitRequest = FalsequitRequest =
Falsereply =
New StringReader(receiveXMLText)xmlRead =
New XmlTextReader(reply) While xmlRead.Read Select Case xmlRead.NodeType Case XmlNodeType.TextLoginResult = xmlRead.Value
If LoginResult.Equals("1") ThenController.docInfo = Login.UserID.Text
'Application.DoEvents() ElseMsgBox(
"Sorry, you have entered an invalid username or password.", MsgBoxStyle.Exclamation, "Error") End If Exit While End Select End While End If Catch ex As Exception End Try
VB.NET Coding error
swells
try:
Me.UserID.Text
Tom08
I change to Me.UserID.Text but a new error come out.
Error: 'Me' is valid only within an instance method.
What does an instance method here refer to
Do I need to add anything in the code
Thanks
re infecta
what about:
UserID.Text