开发者

how to use a resourcefile item in my aspx file?

this is my code:

<a target="_blank" href="<%$ Resources:WebsiteResource, linkUrl %>"&开发者_运维知识库gt;..</a>

but i get this error that this is not allowed, that i have to use a literal. But this:

   <a target="_blank" href="<asp:literal runat="server" id="Literal1"></asp:literal>">..</a>

leads to this:

<a href=""<asp:literal" id="ctl00_ctl00_CPHMainSection_CPH_LeftSection_Literal1" target="_blank"></asp:literal>">

also tried this:

<a target="_blank" href="<%<asp:literal runat="server" id="Literal1"></asp:literal> %>">

but didn't work either...


<a id="something" runat="server" target="_blank" href="<%$ Resources:WebsiteResource, linkUrl %>">..</a>

put runat="server" will make the magic. Because asp will ignore none server side control

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜