sn gShadow

sn gShadow

  • NA
  • 155
  • 651

DataTable in .Net Core looks plain

Nov 19 2017 9:16 PM
Hi All,

I just tried put DataTable in my project. It look cool and robust. For quick result. I put this instruction into html file and it worked like charm. This is the screenshot.

Confidence with that html result, then, I created a new project in .Net Core and put those code into About/Contact template. What I remove html code to cshtml are head and body tag. But I got plain table like this screenshot.

What I tried to do debugged the javascript by using F12 Developer Tools and I found "Object doesn't support property or method 'DataTable.'"

Why this could happen in VS 2017 CE .net core 2 ? Meanwhile, it works well in html file.
I emphasize the link (css and js) just works fine in html.
  1. "stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">  
  2. <!-- Inject Script Filtered -->  
  3. <!-- Inject Script Filtered -->  
  4. <!-- Inject Script Filtered -->  
I also tried using VS 2015 CE .net Core 1.1, it gave me the same result.

How to overcome this? Please, advice....
 
Rgds,

Answers (1)