Contact Form with my Master Pages

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/main.Master" CodeBehind="register.aspx.vb" Inherits="register" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>IOG Products, LLC</title> 
    <meta name="description" content="IOG products are used throughout the production process and during the journey to the ultimate end-user. By attaching our monitors to your shipment it enables you to take more control of your product during transit and helps to reduce your risk by keeping track of them every step of the way. " /> 
    <meta name="keywords" content="IOG Products, transporation monitoring systems, omni-g, impact recorder m series, impact recorder, protect-a-pak, single use tilt indicator, tilt indicator, digital impact recorder, data recorder, single use shock recorder, impact-o-graph, IOG" /> 
    </asp:Content>
    <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    
    <div id="wrappercontact"> 
        <div class="main_content">
             
        
    <form id="form1" runat="server">
        <div style="font-family:Arial;">
            <fieldset style="width:350px;">
                <legend>Contact Us</legend>   
                    <table>
                        <tr>
                            <td>
                                <b>Name:</b>
                            </td>
                             <td>
                                <asp:TextBox ID="txtname" Width="200px" runat="server"></asp:TextBox>       
                            </td>
                             <td class="auto-style2">
                                 <asp:RequiredFieldValidator ID="RequiredFieldValidator1" 
                                     runat="server"
                                     ErrorMessage="Name is required"
                                     ControlToValidate="txtname"
                                     Text="*"
                                     ForeColor="Red"
                                     ></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                        <tr>
                            <td>
                                <b>Company:</b>
                            </td>
                             <td>
                                <asp:TextBox ID="txtCompany" Width="200px" runat="server"></asp:TextBox>       
                            </td>
                             <td class="auto-style2">
                                 <asp:RequiredFieldValidator ID="RequiredFieldValidator6" 
                                     runat="server"
                                     ErrorMessage="Company is required"
                                     ControlToValidate="txtCompany"
                                     Text="*"
                                     ForeColor="Red"
                                     ></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <b>Email:</b>
                            </td>
                             <td>
                                <asp:TextBox ID="txtEmail" Width="200px" runat="server"></asp:TextBox>       
                            </td>
                             <td class="auto-style2">
                                 <asp:RequiredFieldValidator ID="RequiredFieldValidator2" 
                                     runat="server"
                                     ErrorMessage="Email is required"
                                     ControlToValidate="txtEmail"
                                     Display="Dynamic"
                                     Text="*"
                                     ForeColor="Red"
                                     ></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <b>Phone:</b>
                            </td>
                             <td>
                                <asp:TextBox ID="txtPhone" Width="200px" runat="server"></asp:TextBox>       
                            </td>
                             <td class="auto-style2">
                                 <asp:RequiredFieldValidator ID="RequiredFieldValidator7" 
                                     runat="server"
                                     ErrorMessage="Phone is required"
                                     ControlToValidate="txtPhone"
                                     Display="Dynamic"
                                     Text="*"
                                     ForeColor="Red"
                                     ></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <b>Subject:</b>
                            </td>
                             <td>
                                <asp:TextBox ID="txtSubject" Width="200px" runat="server"></asp:TextBox>       
                            </td>
                             <td class="auto-style2">
                                 <asp:RequiredFieldValidator ID="RequiredFieldValidator3"  
                                     runat="server"
                                     ErrorMessage="Subject is required"
                                     ControlToValidate="txtSubject"
                                     Text="*"
                                     ForeColor="Red"
                                     ></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        </tr>
                         <tr>
                            <td>
                                <b>Item being shipped:</b>
                            </td>
                             <td>
                                <asp:TextBox ID="txtItembeingshipped" Width="200px" runat="server"></asp:TextBox>       
                            </td>
                             <td class="auto-style2">
                                 <asp:RequiredFieldValidator ID="RequiredFieldValidator8" 
                                     runat="server"
                                     ErrorMessage="Item is required"
                                     ControlToValidate="txtItembeingshipped"
                                     Text="*"
                                     ForeColor="Red"
                                     ></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <b>How fragile is the shipment?</b>
                            </td>
                             <td>
                                <asp:TextBox ID="txtHowfragileistheshipment" Width="200px" runat="server"></asp:TextBox>       
                            </td>
                             <td class="auto-style2">
                                 <asp:RequiredFieldValidator ID="RequiredFieldValidator9" 
                                     runat="server"
                                     ErrorMessage="Fragile indication required"
                                     ControlToValidate="txtHowfragileistheshipment"
                                     Text="*"
                                     ForeColor="Red"
                                     ></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                         <tr>
                            <td>
                                <b>What are the dimensions of the shipment?</b>
                            </td>
                             <td>
                                <asp:TextBox ID="txtwhatarethedimensionsoftheshipment" Width="200px" runat="server"></asp:TextBox>       
                            </td>
                             <td class="auto-style2">
                                 <asp:RequiredFieldValidator ID="RequiredFieldValidator10" 
                                     runat="server"
                                     ErrorMessage="Dimensions required"
                                     ControlToValidate="txtwhatarethedimensionsoftheshipment"
                                     Text="*"
                                     ForeColor="Red"
                                     ></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                         <tr>
                            <td>
                                <b>How much does shipment weigh?</b>
                            </td>
                             <td>
                                <asp:TextBox ID="txthowmuchdoesshipmentweigh" Width="200px" runat="server"></asp:TextBox>       
                            </td>
                             <td class="auto-style2">
                                 <asp:RequiredFieldValidator ID="RequiredFieldValidator11" 
                                     runat="server"
                                     ErrorMessage="Weightment required"
                                     ControlToValidate="txthowmuchdoesshipmentweigh"
                                     Text="*"
                                     ForeColor="Red"
                                     ></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td style="vertical-align:top;">
                                <b>Comments:</b>
                            </td>
                             <td style="vertical-align:top;">
                                <asp:TextBox ID="txtComments" Width="200px" runat="server" Rows="5" TextMode="MultiLine"></asp:TextBox>       
                            </td>
                             <td style="vertical-align:top;" class="auto-style2">
                                 <asp:RequiredFieldValidator ID="RequiredFieldValidator4" 
                                     runat="server"
                                     ErrorMessage="Comments are required"
                                     ControlToValidate="txtComments"
                                     Text="*"
                                     ForeColor="Red"
                                     ></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                         <tr>
                            <td colspan="3">
                                <asp:Button ID="Button1" runat="server" Text="Submit" onClick="Button1_Click"/>
                            </td>
                        </tr>
                        </table>
                    </fieldset>
                </div>
                    <!--<INPUT TYPE=SUBMIT > <INPUT TYPE=RESET>-->
            </form>
    </div>
    
    </asp:Content>

Hi Im trying to make my Code Behind Code to read my Contact Form page but it is not reading any idea what I am missing?

Imports System.Net.Mail

Public Class register
    Inherits System.Web.UI.Page
    Protected Sub Page_Load(sender As Object, e As EventArgs)

    End Sub

    Protected Sub Button1_Click(sender As Object, e As EventArgs)
        Try
            Dim mailMessage As New MailMessage()
            mailMessage.From = New MailAddress("myemail@domain.com")
            mailMessage.[To].Add("myemail@domain.com")
            mailMessage.Subject = txtSubject.Text

            mailMessage.Body = "<b>Sender Name : </b>" + txtname.Text + "<br/>" + "<b>Sender Email : </b>" + txtEmail.Text + "<br/>" + "<b>Comments : </b>" + txtComments.Text
            mailMessage.IsBodyHtml = True


            Dim smtpClient As New SmtpClient("smtpout.secureserver.net ", 465)
            smtpClient.EnableSsl = True
            smtpClient.Credentials = New System.Net.NetworkCredential("Somename@gmail.com", "*******")
            smtpClient.Send(mailMessage)

            Label1.Text = "Thank for contacting us"
            Label1.ForeColor = System.Drawing.Color.Blue

            txtname.Enabled = False
            txtEmail.Enabled = False
            txtComments.Enabled = False
            txtSubject.Enabled = False
            Button1.Enabled = False
        Catch generatedExceptionName As Exception
            ' Log - Event Viewer or table 
            Label1.ForeColor = System.Drawing.Color.Blue
            Label1.ForeColor = System.Drawing.Color.Red
            Label1.Text = "There is an unknown problem. Please try later"
        End Try
    End Sub

    Protected Sub DropDownList1_SelectedIndexChanged(sender As Object, e As EventArgs)

    End Sub

    Protected Sub ddlCountries_SelectedIndexChanged(sender As Object, e As EventArgs)

    End Sub

    
End Class


'=======================================================
'Service provided by Telerik (www.telerik.com)
'Conversion powered by NRefactory.
'Twitter: @telerik
'Facebook: facebook.com/telerik
'=======================================================

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.