Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Would like to Concatenate string value with '<%#Eval("Remaining_Seats")%>' to form the text of an asp.Table cell

Posted on 2008-06-13
Last Modified: 2008-07-02
I would like to concatenate string value of "Number Remaining:" with '<%#Eval("Remaining_Seats")%>' to form the text of an asp.Table cell.

Any ideas?
Question by:DanGettel
  • 3
  • 2

Assisted Solution

nds_rahulmistry earned 100 total points
ID: 21784092

Simply type

"Number Remaining : " & <%#Eval("Remaining_Seats")%>

Author Comment

ID: 21784948
Sorry, but it didn't work when I typed

"Number Remaining : " & <%#Eval("Remaining_Seats")%>
That gave me (Parser Error  The server tag was not well formed.) error message.

Any other ideas

LVL 65

Assisted Solution

RobSampson earned 400 total points
ID: 21788256
Hi, would you be able to use:

<td>Number Remaining:<%#Eval("Remaining_Seats")%></td>

or maybe

<td>Number Remaining:<%Eval('Remaining_Seats')%></td>

or, assuming "Remaining_Seats" was the name of a variable that was already assigned a value in ASP, maybe

<td>Number Remaining:<%Remaining_Seats%></td>


Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.


Author Comment

ID: 21788942
Sorry,  but I still can't get things to work.

Here is an example of an asp:Table cell that successfully displays the Remainind_Seats value:

<asp:TableCell ID="TableCell2" runat="server" ColumnSpan="2" VerticalAlign="Top" Text ='<%#Eval("Remaining_Seats")%>'>

Here is an example of an asp:Table cell that successfully displays "Number Remaining:"

<asp:TableCell ID="TableCell1" runat="server" Text='<strong>Number Remaining:&nbsp;&nbsp;</strong>'>

So what I am really trying to do is combine the two into one cell.

LVL 65

Assisted Solution

RobSampson earned 400 total points
ID: 21789740
Hmmm, in that case, by all accounts, this should work.....in theory.....

<asp:TableCell ID="TableCell1" runat="server" Text='<strong>Number Remaining:&nbsp;&nbsp;<%#Eval("Remaining_Seats")%></strong>'>



Accepted Solution

DanGettel earned 0 total points
ID: 21856295
The following is the only way that I have found to get the cell to appear the way I intended:

<asp:TableCell ID="TableCell11" runat="server" ColumnSpan="2">
    <strong>Remaining Seats:&nbsp;&nbsp;</strong>
    <asp:Label ID="Label1" runat="server" Text='<%# Eval("Remaining_Seats") %>'></asp:Label>

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question