I want to send a string data with jquery load function but its not sending, my code is
function dialog(data) {
$(function () {
alert(data);
var ph = $("#Org1");
ph.empty();
ph.load("/FrontEnd/DocsDownload", data, function () {
ph.dialog({
width: 500,
modal: true,
show: 'slide',
closeText: 'hide',
draggable: false,
resizable: false,
title: "Download"
});
});
});
}
alert show me the data but when it goes to that controller and i pick value from data variable it have null value. My controller code is
public ActionResult DocsDownload(string data)
{
}
what may be the problem?
The data parameter is a name/value pair:
.load('/FrontEnd/DocsDownload', { data: 'Hello World' }, function () {
And send multiple parameters:
.load('/FrontEnd/DocsDownload', { param1: 'value1', param2: 'value2' }, function () {
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With