I have below non strongly typed html view
@{
ViewBag.Title = "CreateNonStronglyBlog";
}
<h2>Create Non Strongly Blog</h2>
@using (@Html.BeginForm("CreateBlog","blog")){
@Html.Label("namelable", "Put your name here", new { @id = "name" })
@Html.TextBox("txtname", "", new { @id = "txtName"})
@Html.Label("urllable", "Put your Url here", new { @id = "url" })
@Html.TextBox("txturl", "", new { @id = "txturl"})
<input type="submit" value="Create" class="btn btn-default" />
}
And below i have my controller actions to be call on submitting this form.
public ActionResult CreateBlog(Blog blg)
{
topBlogs.Add(blg);
return View("IndexNotStronglyTyped", topBlogs);
}
How to submit the form and send the values to controller's action method ?