我在母版页中使用了以下代码。
<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"
时,它的id
和它包含的所有元素的id
需要跟在后面与 C# 属性相同的命名约定。
我看不到您的 HTML 结构,但如果您将破折号 -
更改为下划线 _
,它很可能会解决您的问题。
关于asp.net - VS 2012 中的解析器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14416513/