VB.NET Coding error

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:TextBoxID="UserID"runat="server">User1</asp:TextBox>

Try

If s.ConnectedThen

s.Send(bytesSent, bytesSent.Length, 0)

Do

bytes = s.Receive(bytesReceived, bytesReceived.Length, 0)

receiveText = Encoding.ASCII.GetString(bytesReceived, 0, bytes)

receiveXMLText = receiveXMLText + receiveText

If receiveText.IndexOf("</packet>")Then

quitRequest =True

receiveXMLText = receiveXMLText &"</packet>"

EndIf

'Application.DoEvents()

LoopWhile quitRequest =False

quitRequest =False

reply =New StringReader(receiveXMLText)

xmlRead =New XmlTextReader(reply)

While xmlRead.Read

SelectCase xmlRead.NodeType

Case XmlNodeType.Text

LoginResult = xmlRead.Value

If LoginResult.Equals("1")Then

Controller.docInfo = Login.UserID.Text

'Application.DoEvents()

Else

MsgBox("Sorry, you have entered an invalid username or password.", MsgBoxStyle.Exclamation,"Error")

EndIf

ExitWhile

EndSelect

EndWhile

EndIf

Catch exAs Exception

EndTry

[4508 byte] By [SnowTeo] at [2007-12-28]
# 1

try:

Me.UserID.Text

ahmedilyas at 2007-9-4 > top of Msdn Tech,Visual Basic,Visual Basic Language...
# 2

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

SnowTeo at 2007-9-4 > top of Msdn Tech,Visual Basic,Visual Basic Language...
# 3

what about:

UserID.Text ?

ahmedilyas at 2007-9-4 > top of Msdn Tech,Visual Basic,Visual Basic Language...