Hello,
I have a asp:Wizard control on a site running Framework 3.5. I acquired the settings from the web host and have entered them into the Web Configuration Utility. Here's the code behind file:
Protected Sub Wizard1_FinishButtonClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.WizardNavigationEventArgs) Handles Wizard1.FinishButtonClick
Dim mySMTPClient As New SmtpClient()
Dim sb As New StringBuilder
Dim myMail As New MailMessage("[email protected]", "[email protected]")
Dim myFrom As New MailAddress("[email protected]")
Dim myTo As New MailAddress("[email protected]")
myMail.BodyEncoding = System.Text.Encoding.UTF8
myMail.IsBodyHtml = False
myMail.To.Add(myTo)
myMail.Subject = "Request for Information"
sb.Append("Contact Name: ")
sb.Append(txtcontactname.Text)
sb.Append("<br/>Phone Number: ")
sb.Append(txtcontactphone.Text)
sb.Append("<br/>Employer Name: ")
sb.Append(txtemployername.Text)
sb.Append("<br/>City: ")
sb.Append(txtcity.Text)
sb.Append("<br/>State: ")
sb.Append(cmbstate.Text)
sb.Append("<br/>Zip: ")
sb.Append(txtzip.Text)
sb.Append("<br/>Other Location: ")
sb.Append(txtotherloc.Text)
sb.Append("<br/>Nature of Business: ")
sb.Append(txtbusnat.Text)
sb.Append("<br/>Eligible Employees: ")
sb.Append(txteligemps.Text)
sb.Append("<br/>Average Employee Turnover Per Year: ")
sb.Append(txtempturnover.Text)
sb.Append("<br/>Broker Name: ")
sb.Append(txtbrokername.Text)
sb.Append("<br/>Broker Email: ")
sb.Append(txtbrokeremail.Text)
sb.Append("<br/>Proposed Effective Date: ")
sb.Append(txteffdate.SelectedDate)
sb.Append("<br/>Limited Benefit Medical Plans: ")
For Each item As ListItem In chkmedplans.Items
If (item.Selected) Then
sb.Append(item.Text)
sb.Append(" ")
End If
Next
sb.Append("<br/>Voluntary Products/Services: ")
For Each item As ListItem In chkvolserv.Items
If (item.Selected) Then
sb.Append(item.Text)
sb.Append(" ")
End If
Next
sb.Append("<br/>Employer Paid Products/Services: ")
For Each item As ListItem In chkempserv.Items
If (item.Selected) Then
sb.Append(item.Text)
sb.Append(" ")
End If
Next
sb.Append("<br/>Preferred Benefit Enrollment Program(s): ")
For Each item As ListItem In chkenrolprog.Items
If (item.Selected) Then
sb.Append(item.Text)
sb.Append(" ")
End If
Next
sb.Append("<br/>Comments: ")
sb.Append(txtcomments.Text)
myMail.Body = sb.ToString()
Try
mySMTPClient.Send(myMail)
Catch ex As Exception
Dim ex2 As Exception = ex
Dim errorMessage As String = String.Empty
While Not (ex2 Is Nothing)
errorMessage += ex2.ToString()
ex2 = ex2.InnerException
End While
Response.Write(errorMessage)
End Try
End Sub
End Class
The code complies with no error. When loaded onto the shared hosting account, the page loads and the code allows the user to enter information into the wizard. However, the Finish button does not fire the final step. Here's the code for the final wizard step:
<asp:WizardStep ID="WizardStep4" runat="server" StepType="Complete" Title="Complete">
Thank you for your inquiry. A member of our staff will contact you regarding your request.</asp:WizardStep>
I cannot determine what is cuasing this issue. Can someone direct me as to possible causes?
Thanks, Sid