MVC 2 Insert,Delete,Update

Posted by Jayakumars under Regular Expressions on 4/21/2011 | Points: 10 | Views : 17386 | Status : [Member] [MVP] | Replies : 1
hi

MVC 2 Insert,Delete,Update using Dbml in mvc2 i need briefly

Mark as Answer if its helpful to you


Responses

Posted by: Manishsoni on: 4/21/2011 [Member] Starter | Points: 25

Up
0
Down
HI,

create an mvc application add folder in View ABC.


Add View(Create,Update,delete) to ABC.

if you want any validation add and model and apply.
now goto controller and add controller ABCController.

add Methods for Create update and delete like


public ActionResult Create()
{
return View();
}

[HttpPost]
public ActionResult Create(CreateModel model, ref CreateStatus)
{
}

public ActionResult Update()
{
return View();
}

[HttpPost]
public ActionResult Update(updateModel model, ref UpdateStatus)
{
}

public ActionResult Delete()
{
return View();
}

[HttpPost]
public ActionResult Delete(DeleteModel model, ref DeleteStatus)
{
}



--------------------------------------------------

http://www.asp.net/mvc/tutorials/getting-started-with-mvc-part1
http://www.asp.net/mvc/tutorials/getting-started-with-mvc-part2
http://www.asp.net/mvc/tutorials/getting-started-with-mvc-part3


Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response