簡體   English   中英

VS 2012中的解析器錯誤

[英]Parser Error in VS 2012

我在母版頁中使用以下代碼。

<link rel='stylesheet' id='layer-styles-css'  
     href='css/layerslider.css?ver=3.4.1' type='text/css' media='all' />

它在MS Visual Studio 2012中調試時給我錯誤。

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: 'layer-styles-css' is not a valid identifier.

請幫助我修復它。

當控件標記為runat="server" ,其idid以及所有包含的元素都需要遵循與C#屬性相同的命名約定。

我看不到您的HTML結構,但是如果您將破折號-改為下划線_ ,則很可能會解決您的問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM