How to get these values front end using asp.net mvc


How to get these values front end using asp.net mvc



<div>         <label>             Date:          <span><input type="text" id="date" /></span>         <%--<%=Html.EditorFor(model=>model.Date) %>--%> // Should I use this as Input type?         </label>         <label>             Number#:             <%=Html.TextBox("Number", ViewData["inq"] ?? "")%>         </label>         <label>Comment</label>         <span>            <%=Html.TextArea("value")%>            <%=Html.ValidationMessage("value")%>           </span>     </div> 

I am trying to get these three fields on the screen while user enters I am retreving the user enter data on front end.. when I am debugging I am not seeing these fields..

On the view I am using beginForm

<% using (Html.BeginForm("Update", "Home", FormMethod.Post, new { @id = "id" }))    { %> 

my method..

public JsonResult Update(StudentInfo info) {   ///Update   return Json(Status.ToString());  } 

when I see in info I am not getting these three fields..

can any one help me out thanks


Not display/write specific html if model.entity is null

1:

Possible to disable/make item not visable in select list?
You are returning a JsonResult although doing as Http post (Html.BeginForm). Is MVC .net right for my project type?If you want to use a full form post then return a ActionResult.. Last login time using the ASP.NET Membership API
 public ActionResult Index()         {             // Add action logic here             return View();         } 
Weird ASP.NET MVC links with (A(anythingworkshere))What are some alternatives to RedirectToAction?

2:

What open source software uses ASP.NET MVC [closed]
you must call void controller. ASP.NET MVC Ajax Actions results enveloping

3:

It makes no sense this you're returning a JsonResult from a HTML Post.. Do this instead..
[HttpPost] public ActionResult Update(StudentInfo info) {   ///Update   if (updateWorked)     return View("Success", status); } 
You use JsonResult when you want to call a controller this returns JSON data, in rule to display this data any where on your page.. A useful scenario for JsonResult in your scenario would be returning a json list of Students, executed from a click event maybe (call in JavaScript/jQuery).. Calling an action method on a HTTP Post which returns a JsonResult of a single string (not real JSON) makes no sense..


97 out of 100 based on 72 user ratings 347 reviews

@