I have the following code in my NewMember.cshtml View file:
@{
ViewBag.Title = "New Member";
}
<div id="newForm">
<table>
<tr>
<td class="first"><label title="Date" runat="server">Date</label></td>
<td class="second"><input id="DateBox" value="test"" /></td>
</tr>
<tr>
<td class="first"><label title="FirstName" runat="server">First Name</label></td>
<td class="second"><input id="FirstNameBox" runat="server" /></td>
</tr>
<tr>
<td class="first"><label title="LastName" runat="server">Last Name</label></td>
<td class="second"><input id="LastNameBox" runat="server" /></td>
</tr>
<tr>
<td class="first"><label title="DOB" runat="server">Date of Birth</label></td>
<td class="second"><input id="DOBBox" runat="server" /></td>
</tr>
</table>
<input type="submit" value="Submit"/>
</div>
And my Controller file for this contains the following method:
public ActionResult NewMember()
{
return View();
}
I am using Microsoft's SQL Server 2008 to hold these information. I know how to make a query to the database using c#, but I don't understand how to get the inputted data from the View file to the Controller.
Any help would be greatly appreciated.
Thanks
EDIT: a little bit more information - I've been looking around the internet for this problem and I seen some uses Javascript. Unfortunately, I do not know any javascript, so is there a way to do this without using javascript?