-1

How can I concatenate two strings in a id of a unordered list. The problem is :

<li id='autor<%# Eval("id") %>' runat="server"/>

What I have inside of <%# Eval("id") %> is the id of the author I and want in my id the string autor plus the id.

How can I do that?.

With the id it's different than the Text, so I don't know how to do that.

zoit
  • 571
  • 2
  • 19
  • 39

2 Answers2

2
'<%# "Mr " + Eval("ID") & Eval("LastName")%>
Shantanu Gupta
  • 20,130
  • 53
  • 177
  • 277
0

You can achieve it using:

<li id='<%# "Author"+ Eval("id") %>' runat="server"/>
Zaheer Ahmed
  • 27,470
  • 11
  • 72
  • 109