How to acheieve this kind of behaviour in asp.net mvc

Posted by kumar on Stack Overflow See other posts from Stack Overflow or by kumar
Published on 2010-05-25T20:47:55Z Indexed on 2010/05/25 20:51 UTC
Read the original article Hit count: 144

Filed under:
|

Hello Friends,,

I have this two Action result methods.

public ActionResult GetStudentInfo(StudentBE s)
        {
            return PartialView("editStudent", s);
        }



public ActionResult GenericList()
            {
                StudentBE codes = new StudentBE();
                codes.lookcodes= GetStudentCodes(new string[] { "A", "B", "C, "D", "E" });
                return PartialView(codes);
            } // Lookcodes display dropdownlist boxes in the GeneridList view..
In genericList view I hvae beginForm.. 
    <% using (Html.BeginForm("Updatestudent", "expense", FormMethod.Post, new { @id = "id" })) 
       { %>
<% } %>

so My updatestudent method is

[HttpPost] public JsonResult Updatestudent(StudentBE e) {

   var status = common.Update(e.student);
            }        
        }
        return Json(status.ToString());
    }

Here is my problem..

the GetStudentInfo Actionresult is having each student information..

in UpdateStudent method

Update Method calls the DB calls for stored procedure to update each user information

now to update each user I need to call GetstudentInfo each time to get student information to update..?

how to call GetStudentInfo method here to get studentinformation? student informatin may be multiple that is more than one student informaton...

can anybody help me out..

thanks

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about asp.net-mvc