我试图自动将 asp:label 的文本设置为 url 参数,但它似乎不起作用。
这是我的代码:
<asp:Label ID="lblHouse" runat="server"
Text='<%# Request.QueryString["Selection"] %>'
Font-Bold="True"
Font-Size="Large"></asp:Label> <br /> <br />
我究竟做错了什么?
感谢您的帮助。
您可以使用 (而不是
<asp:Label ID="lblHouse" runat="server"
Font-Bold="True"
Font-Size="Large"><%= Server.HTMLEncode(Request.QueryString["Selection"]) %></asp:Label>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)