html 解析器错误消息:解析器错误消息:服务器标记格式不正确
我在下面的代码行中收到错误解析器错误消息:服务器标记格式不正确。:
<asp:HyperLink ID="imgFileType" ImageUrl="images/Icon_Pdf.gif" NavigateUrl='<%#"javascript:ViewFile('erg_", Eval("DocumentName") %>' runat="server"></asp:HyperLink>
我需要将 url 链接解析为:
javascript:ViewFile('erg_Invoice_3200_QRG_Restaurant.pdf');
语法中缺少什么?
I am getting the error Parser Error Message: The server tag is not well formed. on the code line below:
<asp:HyperLink ID="imgFileType" ImageUrl="images/Icon_Pdf.gif" NavigateUrl='<%#"javascript:ViewFile('erg_", Eval("DocumentName") %>' runat="server"></asp:HyperLink>
I need the url link to be parsed as:
javascript:ViewFile('erg_Invoice_3200_QRG_Restaurant.pdf');
What am I missing in the syntax?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

你不能那样做。单引号双引号的混乱会让编译器抱怨。
请写一个助手。
标记
代码隐藏
You cannot do that. The single quote double quote mess will make the compiler complain.
Please write a helper.
Markup
Code-Behind