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 "
精彩评论