简体   繁体   English

对于imageButton,服务器标签格式不正确

[英]The server tag is not well formed for imageButton

<asp:ImageButton ID="Image1" Width="50px" Height="50px" runat="server" ImageUrl='<%# "ImageHandler.ashx?ImID="+ Eval("Ifile")  %>' OnClientClick='<%#"javascript:window.open(' ImageHandler.ashx?ImID="+ Eval("Ifile")  "')"%>' />

Does anyone tell me what's wrong with this tag? 有没有人告诉我这个标签有什么问题? I'm getting error on this tag. 我在这个标签上收到错误。

You cannot use an apostrophe ' inside the binding, use &#39; 不能使用单引号'里面的绑定,使用&#39; .

<asp:ImageButton ID="Image1" Width="50px" Height="50px" runat="server" ImageUrl='<%# "ImageHandler.ashx?ImID="+ Eval("Ifile") %>' OnClientClick='<%#"javascript:window.open(&#39;ImageHandler.ashx?ImID="+ Eval("Ifile") + "&#39;)" %>' />

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM