I'm using mvc 3 (C#), I have a contact form used for sending emails. However the submit button does not work properly.
//view/home/contact.cshtml
@using (Html.BeginForm())
{
<div id="divContact">
<table>
<tr>
<td>
@Html.TextArea("txtComment", "")
</td>
</tr>
<tr>
<td>
<input id="btnContactSubmit" name="btnSubmit" type="submit" value="Send" />
</td>
</tr>
</table>
</div>
}
//HomeController
[HttpPost]
public ActionResult Contact(string email, string subject, string body)
{
try
{
WebMail.SmtpServer = "smtp info goes here";
WebMail.Send(email, subject, body, email);
return RedirectToAction("Confirmation", "Email");
}
catch (Exception)
{
return RedirectToAction("SendError", "Email");
}
}
This works fine on my local host, however, when I upload it to godaddy, the submit does not seem to do anything when pressed.