Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Vishal Joshi 5 posts 25 karma points
    Apr 12, 2012 @ 12:30
    Vishal Joshi
    0

    QueryString parameter with RedirectToAction

    HI

    I am new to Umbraco and MVC3. In our project we need to reload the same page if server side validations fails.

    I have following two methods defined

    [ChildActionOnly]
            public PartialViewResult Edit(string ID)
            { return PartialView(model)}
    [HttpPost]
            public ActionResult Edit(Model ViewModel)
            {   }
    When user clicks on "Save" button the HTTPPOST method is called. All busnises rules are validated. If any one of the rule fails we need to reload the page. return RedirectToAction("Edit","ControllerName", new { Id = Model.Id });. Now in this case I need to pass ID as query string to GET method.
    Any pointers to this will be very helpful.
    Thanks in anticipation
    
    

Please Sign in or register to post replies

Write your reply to:

Draft