and <%# %>\" for serv开发者_StackOverflow社区er control?I try use of \"<%= %> and <%# %>\"" />
开发者

Use of <%= %> and <%# %> for server control

How i can use of "<%= %> and <%# %>" for serv开发者_StackOverflow社区er control?I try use of "<%= %> and <%# %>" in a LinkButton(Like below tag a) ,but i get this Error "Invalid expression term '>'", but tag a was without Error?

<a title='<%#Eval("Title")%>' href="<%="WebForm6.aspx?ID="%><%#Eval("News_ID")%>">content</a>


you cant use inside as internal attribute a server tag <%....

what you can do is :

make it a server side control and in ItemDataBount Event - to findControl using Id and then set its attributes.


Try wrapping the href attribut in ' iinstead of "

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜