我如何在asp.net中解决常量错误中的换行符? [英] how can i solve newline in constant error in asp.net ?
本文介绍了我如何在asp.net中解决常量错误中的换行符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何在asp.net中以恒定错误解决换行符?
解决方案
我认为您需要此
PRB:字符串包含</SCRIPT>时出现"CS1010:常量换行"错误消息内联代码中的标记 [ ^ ]
使用string.Format格式化内容.
请显示您编写的代码
从代码中删除最后一个双引号
< asp:image id = " runat = " imageurl = ' <%#"getImage.aspx?id =" + Eval("ProductID")%>'/>
>
how can i solve newline in constant error in asp.net ?
解决方案
I think you need this
PRB: "CS1010: Newline in Constant" Error Message When a String Contains a </SCRIPT> Tag in the Inline Code[^]
use string.Format to format the content.
please show the code that you have written
Remove last double quote from your code
<asp:image id="i1" runat="Server" imageurl='<%# "getImage.aspx?id=" + Eval("ProductID") %>'/>
这篇关于我如何在asp.net中解决常量错误中的换行符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文