Webmatrix chapter 3
in the image button control when trying to run the code from the tryout,
I am getting the following error: Object reference not set to an instance of an object. I checked the code and it matches what's in the book. I even downloaded from the internet the code and copy it. is there anything else I should check ? I can not figure out what is the problem
her is the code for the button
Sub ImageButton1_Click(sender As Object, e As ImageClickEventArgs)
Dim Message As String
Message = "Hello " & txtName.Text & "."
If chkTour.Checked Then
Message &= " We will send you details of the tour schedule for " & cboCountry.SelectedItem.Text
End If
If radMail.SelectedItem.Value = "HTML" Then
Label1.Text = "Using HTML format for mail. Sending:<p />" & Message
Else
Label1.Text = "Using plain format for mail. Sending:<p />" & Message
End If
End Sub
|