Jquery ui css does not load and creates problems with asp.net mvc3 page (unexpected marker error)

Firstly, I see that my mvc3 project already had jquery ui but no css theme files.

I need a date selected and, as usual, to override EditorFor DateTime. I started from today, just using the default jquery ui js files supplied with the project under scripts. The date picker displays well, only with a complete corrupted Site.css based user interface.

So, now I downloaded the jquery assembly (with the start theme ) and after this page on how to build it.

I use T4MVC, so my page looks like this:
Layout.cshtml

<script src="@Links.Scripts.jquery_1_4_4_js" type="text/javascript"></script>
<link href="@Links.Content.Site_css" rel="stylesheet" type="text/css" />
<script src="@Links.Content.start.jquery_ui_1_8_7_custom_css" type="text/javascript"></script>

Create.cshtml

 <script src="@Links.Scripts.jquery_validate_min_js" type="text/javascript"></script>
    <script src="@Links.Scripts.jquery_validate_unobtrusive_min_js" type="text/javascript"></script>
    <script src="@Links.Scripts.jquery_ui_1_8_7_custom_min_js" type="text/javascript"></script>

And this is the result:
alt text

, , script css , .


. , <script> <link> ! , css Site.css.
alt text


2:

, jquery css. fiddler, css.

!

<link href="@Links.Content.start.jquery_ui_1_8_7_custom_css" **rel="Stylesheet"** type="text/css" />

! , rel!

+3
2

Layout.cshtml script, css. :

<script src="@Links.Content.start.jquery_ui_1_8_7_custom_css" type="text/javascript"><script> to

<link href="@Links.Content.start.jquery_ui_1_8_7_custom_css" rel="stylesheet"></link>
+3

datepicker. :

  • jquery ui " ", " CSS". css datepicker /. "jqueryui_element".

  • css, css/scope, . , , - javascript:

    $('#ui-datepicker-div').wrap('<div class="jqueryui_element"></div>');

#ui-datepicker-div - , datepicker. - , .

, !

+1

Source: https://habr.com/ru/post/1782620/


All Articles