Concatenate aps.net expressions with literal text

Asked

Viewed 97 times

0

I have that expression:

<asp:Label Text='<%# Eval("Analista") %>' runat="server" /><br />

The result is Approved or Disapproved. I would like to add the following word: by: In which the final result would be:

Approved/Disapproved by:

How do I do it? I tried with the por: inside the simple quote, I tried with + inside the simple quote, I tried outside and none of the alternatives worked.

  • And if you do <asp:Label Text='<%# Eval("Analista") %>' runat="server" /><label>&nbsp por:</label><br />?? Or even without putting the <label>

  • It worked, but the sources are different. The reason: it was very small. I did so and it worked: <Sp:Label Text='<%# Eval("Situation") %>' runat="server" />by:></label><br />

  • Yeah, that should do it, too. I just didn’t suggest it because I thought you already tried

  • I didn’t even think about doing it like this, really. But I solved it like this: <Asp:Label Text='<%# Eval("Situation") %>' runat="server" /><Asp:Label Text="by:" runat="server" /><br />

  • I told you to use the tag <label> because they could have the same css properties as <asp:Label />, but there, there you go ;)

  • @Cesarmiguel, post your suggestion for me to finish as your solution.

Show 1 more comment

1 answer

1


I suggest you add at the end of your <asp:Label /> the text "by:", leaving:

<asp:Label Text='<%# Eval("Analista") %>' runat="server" /><label>&nbsp por:</label><br />

Start if you don’t have problems with CSS you won’t have any source problems

Browser other questions tagged

You are not signed in. Login or sign up in order to post.