Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JQuery: Visual studio, error CS1056: Unexpected character '$'

Trying to include ThickBox (from http://jquery.com/demo/thickbox/) in an ASP.NET application.

Visual Studio is failing when I try to run the application with the error: js\ThickBox\jquery-1.2.6.min.js(11): error CS1056: Unexpected character '$'

Using Visual Studio 2008 and jquery 1.2.6

like image 365
Bryce Fischer Avatar asked Oct 14 '08 12:10

Bryce Fischer


1 Answers

CS1056 is obviously a C# compiler error. This kind of thing happens when you put runat="server" in a client script include tag (Visual Studio attempts to compile your .js file as if it was C#). Just remove the runat="server" attribute and try again.

like image 143
rciq Avatar answered Nov 04 '22 10:11

rciq