Call JQuery function From Controller
I am populating dropdown list using JQuery. whenever i selected any item from that dropdown (i.e Drop down selected index change) i want to run an anot开发者_StackOverflowher JQuery Function... Here is my controller..
public ActionResult PopulateTest(string Id)
{
// Here i want to call the JQuery function
return PartialView("Details");
}
and my JQuery Function...
$(function () {
var a = document.getElementById("HidStatus").value;
var b = parseInt(a);
$("#progressbar").progressbar({
value: b,
max: 100
});
});
i think this might be helpful to you..just try this...
public ActionResult PopulateTest(string Id)
{
// Here i want to call the JQuery function
page << "foo()" // call your function here after "<<"
or you can use call method
page.call:foo();
return PartialView("Details");
}
here is reference of call method call
精彩评论