0

I have used one dropdown box above Webgrid for change the row per page at dynamically by user when i call the javascript and get the value and post to some URL ..but it's NOT post to my controller Actionresult method....so please help it;s emergency..! I have try so many way..but it's all are not work in my project please any have idea to my error... My Usable statement..

$.ajax(
{
    type: 'POST',
    url: '/Admin/UserActive/' + strvalue,
    data: strvalue,
    datatype: "String",
    success: function (result) 
    {
    }
});



$.post('@Url.Action("UserActive","Admin", new{})' + '?Id=' + strvalue);
$.post('@Url.Action("UserActive","Admin")', { Id: strvalue });


$.post('@Url.Action("/Admin/Pagesize")', { rowsPerPage: value });
$.post('/Admin/UserActive',
{
    id: strvalue.toString(),

});

all the statement are used in my javascript function to post the control to my actionresult method for do some logic..but when post statement are not work or is incorrect please ..give hint..

all this statement are work when I have used in my new project it's not work in my current application.

tkanzakic
  • 5,499
  • 16
  • 34
  • 41
Michel jeams
  • 103
  • 5
  • 17

1 Answers1

0

Add one parameter in your action with same name as your dropdownlist and post or call the action and return the result according to your page size given in your dropdown value.

for ex.

public ActionResult UserAgent(string yourDropDownName)
{
}
Hitesh Bavaliya
  • 923
  • 1
  • 11
  • 19