Click here to Skip to main content
15,891,888 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello friends i am new to MVC.

I got error for jquery bootstrap data table. I successfully used this on ".aspx" but when i tried it in MVC I got this error.

In below code,I used "_Demo" layout for side and navigation bar,in that i already used "js" file but that's are not work for this view.

Please help me.
Thank you in advance.

What I have tried:

@model List<demo.models.dashboard>
@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Demo.cshtml";
}

@**@

@Scripts.Render("~/bower_components/datatables.net/js/jquery.dataTables.min.js")








<!-- /.box -->


Employee Details


<!-- /.box-header -->


@foreach (var student in Model)
{
}

First Name Last Name Emp
@student.Full_Name @student.Mobile_Number @student.email_id



<!-- /.box-body -->


<!-- /.box -->

<!-- /.col -->

<!-- /.row -->
Posted
Comments
David_Wimbley 2-Mar-18 1:05am    
The error is pretty clear although your sample code got butchered in process of posting it.

Make sure @Scripts.Render("~/bower_components/datatables.net/js/jquery.dataTables.min.js") is either in the tags of your HTML (not within any partial or in a div in the middle of your layout.cshtml) or at the footer of your layout.cshtml.

Make sure your not missing any other data table javascript files as well.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900