asp mvc: how to pass parameter to controller using jquery api?

Posted by Grayson Mitchell on Stack Overflow See other posts from Stack Overflow or by Grayson Mitchell
Published on 2010-03-08T22:58:05Z Indexed on 2010/03/08 23:06 UTC
Read the original article Hit count: 254

Filed under:
|
|

I am following the following tutorial (http://www.highoncoding.com/Articles/642_Creating_a_Stock_Widget_in_ASP_NET_MVC_Application.aspx) on using ajax to render a partial form , but in this example parameters are not passed, and I have not been able to work out how to do it...

This code works with no parameter

function GetDetails() {
$("#divDetails").load('Details'); 
}

This is my attempt to add a parameter, but does not work (cant find action)

function GetDetails() {
$("#divDetails").load('Details?Id=20'); 
}

© Stack Overflow or respective owner

Related posts about asp

Related posts about asp.net-mvc