asp.net mvc - How to bind IDictionary data in a Webgrid -
i have ajax call calls controllername "floor" , actionmethod "gethotelinglist".i have dropdown list facility. when select option dropdownlist list control goes ajax call.based on selection value, webgrid must displayed. #grdhoteling webgrid id.
$.ajax({ type: 'get', url: '/floor/gethotelinglist', cache: false, contenttype: 'application/html; charset=utf-8', datatype: 'html', data: { floorid: floorid }, success: function (data) { debugger; $("#grdhoteling").val(data); //debugger; //$("#grdhoteling").html(data); }, complete: function () { }, error: function () { if (facilityname.indexof('-') != -1) { $('#floor').empty(); return; } else alert("error in generating hoteling information"); } });
here actionmethod gethotelinglist value paased floorid fileration.
public list<idictionary> gethotelinglist(int floorid) { var model = new list<idictionary>(); using (var context = new floorcontext()) { try { model = listhotelingbyfloorid(context, floorid); } catch (exception ex) { } } return model;}
on success of ajax call, when check through debugger getting data "system.collections.generic.list`1[system.collections.idictionary]" , child cannot evaluated.
kindly help...! thanks...!
Comments
Post a Comment