We help IT Professionals succeed at work.

Using C#, MVC How Am I Able to Return a Populated DataSet to A JQuery Data Table

danielolorenz
on
Using MVC, how am I able to return a populated Data Set in my Controller to a JQuery Data Table on the View?

I have a populated Data Set in the Controller and I need to populated a JQuery Data Table in the View with it.  How can this be done?

Thanks,

Dan
Comment
Watch Question

What is stopping you?
public ViewResult Index() 
{ 
    //logic
    return View(datatable); 
} 

@model System.Data.DataSet

@foreach (DataRow row in Model.Tables[0].Rows)    
{    
    @row["id"] 
 // so on
}  

Open in new window

Author

Commented:
Thanks!