locked
how to pass value from one page to another view RRS feed

  • Question

  • User-1634604574 posted

    i wote this code but i want to send to another view controller not from one view to another view in the same controller

    window.open("edit_page_consultation?series=" + series + "", "_self");

    Friday, November 9, 2018 9:21 PM

All replies

  • User1520731567 posted

    Hi zhyanadil.it@gmail.com,

    i wote this code but i want to send to another view controller not from one view to another view in the same controller

    window.open("edit_page_consultation?series=" + series + "", "_self");

    According to your requirement,I suggest you could code like this:

    window.location.href = "@Url.Action("ActionName2", "ControllerName2", new RouteValueDictionary(new { id = id }))";

    or

    window.location.href = "@Url.Action("ActionName2", "ControllerName2", new { id = id })";

    If you have multiple parameters,you just add ',',and continue to code:

    ...,new RouteValueDictionary(new { id = id,para1=xxx,para2=xxx }))";
    ...,new { id = id,para1=xxx,para2=xxx })";

    Best Regards.

    Yuki Tao

    Monday, November 12, 2018 6:05 AM