i am using asp.net mvc 3. in one my of page. i need to get a list of string from a list object. so i do this:
@{
var orderIds = from s in Model.Orders
select s.id;
}
and from one of my ajax call, i will need "orderIds "
$("#renderBtn").click(function () {
var inputData = {
'orderIds': need to get the order ids here
};
$.ajax({
url: '/Order/ExtraData',
data: inputData,
type: 'POST',
contentType: 'application/json; charset=utf-8',
dataType: 'json',
success: function (result) {
....
},
error: function () {
...
}
});
});
any idea how can i get orderIds and use in javascripts? Thanks
/Order/ExtraDatafor this controller. (i don't know asp.net, so i can't give you more details)