Load content from controller on refresh

4 posts, 0 answers
  1. AspenSquare
    AspenSquare avatar
    60 posts
    Member since:
    Jan 2012

    Posted 15 Nov 2012 Link to this post

    Is it possible to call an ActionResult in my controller in the refresh?

    I need to pass the ID to my Controller to get back data.

    windowObject.refresh({
        url: "/feedbackForm"
    });
  2. AspenSquare
    AspenSquare avatar
    60 posts
    Member since:
    Jan 2012

    Posted 15 Nov 2012 Link to this post

    Never mind, I figured it out.
  3. Logan Marshall
    Logan  Marshall avatar
    5 posts
    Member since:
    Dec 2018

    Posted 17 Jan 2019 Link to this post

    Hi! Do you mind posting what you ended up going with?
  4. Marin Bratanov
    Admin
    Marin Bratanov avatar
    5624 posts

    Posted 18 Jan 2019 Link to this post

    Hello,

    You can supply an URL that points to the desired controller, based on the routing you have. For example:

    windowObject.refresh({
        url: "/myController/myActionMethod/someId?param1=value1¶m2=value2"
    });

    And, of course, if this is in a view, you can have the server render out the string, something like:

    windowObject.refresh({
        url: "@Url.Action("someaction", "somecontroller", new { id = "123" })"
    });


    Regards,
    Marin Bratanov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top