Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class SomeController : Controller
- {
- // GET: /SomeIndex/
- [HttpGet]
- public ActionResult Index(int id)
- {
- SomeIndexViewModel vm = new SomeIndexViewModel(id) { myid = id };
- //Do some processing here
- return View(vm);
- }
- // POST: /SomeIndex/
- [HttpPost]
- public ActionResult Index(SomeIndexViewModel vm)
- {
- bool validationsuccess = false;
- //validate
- if (validationsuccess)
- return RedirectToAction("Index", new {id=1234 });
- else
- return View(vm);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement