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

__RequestVerificationToken

1 Answer 86 Views
Window
This is a migrated thread and some comments may be shown as answers.
Saiphanish
Top achievements
Rank 1
Saiphanish asked on 14 Jan 2017, 10:08 AM

hi,

I am opening an kendo window using the below jquery function.

However I need to pass __RequestVerificationToken to the MVC Controller because I am having "ValidateAntiForgeryToken" Attribute.

However, I am not able to pass it. Can you please suggest how to pass __RequestVerificationToken  while opening an kendoWindow

function OpenTest() {           

var url = '@Url.ActionWithArea("OpenTest", "Test", GlobalConst.AREA_EL_ElectiveEB)';

url += "?test=" +$("#test").val() +
"&test1=" +$("#test1").val();

 

    windowElement = $('<div id = "abc" />').kendoWindow({
    title: 'test',
    content: url,
    modal: true,
   resizable: false,
   draggable: false,
   width: 900,
   height: 400,
   close: function () { windowElement.destroy(); }
}).data("kendoWindow").center().open();

return false;

}

1 Answer, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 17 Jan 2017, 04:13 PM

Hello Saiphanish,

The content option of the Kendo UI Window makes a GET request to the server in order to get the content to be displayed. My suggestion is to add the verification token and its value as a query string to the url. 

Regards,
Boyan Dimitrov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Window
Asked by
Saiphanish
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Share this question
or