I am making a Contact page for a website using ASP.NET. In my aspx file there are a few textboxes. When I try to refer to these textboxes in script by their id's, it says that they are not declared. What am I doing wrong and how can I get this script to work?
VB Code:
dim Mname as string
dim Mphone as string
dim Memail as string
dim Mmessage as string
Public Sub Post
'There are textboxes on the form with the id's Name, Email, Phone and Message
'Here I need to Say that Mname = Name.text... excetera. But it doesnt work
Nname = Name.text
' Build a MailMessage
Dim mailMessage As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage
mailMessage.Subject = "Contact Form Results"
mailMessage.BodyFormat = System.Web.Mail.MailFormat.Html
mailmessage.Body = Mmessage
' TODO: Set the mailMessage.Body property
System.Web.Mail.SmtpMail.SmtpServer = "localhost"
System.Web.Mail.SmtpMail.Send(mailMessage)
end sub