This is a migrated thread and some comments may be shown as answers.

Load content from controller on refresh

3 Answers 196 Views
Window
This is a migrated thread and some comments may be shown as answers.
AspenSquare
Top achievements
Rank 1
AspenSquare asked on 15 Nov 2012, 04:38 PM
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"
});

3 Answers, 1 is accepted

Sort by
0
AspenSquare
Top achievements
Rank 1
answered on 15 Nov 2012, 04:50 PM
Never mind, I figured it out.
0
n/a
Top achievements
Rank 1
answered on 17 Jan 2019, 03:37 PM
Hi! Do you mind posting what you ended up going with?
0
Marin Bratanov
Telerik team
answered on 18 Jan 2019, 12:04 PM
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.
Tags
Window
Asked by
AspenSquare
Top achievements
Rank 1
Answers by
AspenSquare
Top achievements
Rank 1
n/a
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or