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
Solved

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

Posted on 2008-06-13
6
2,531 Views
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?
0
Comment
Question by:DanGettel
  • 3
  • 2
6 Comments
 
LVL 3

Assisted Solution

by:nds_rahulmistry
nds_rahulmistry earned 100 total points
ID: 21784092

Simply type

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

Author Comment

by:DanGettel
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

0
 
LVL 65

Assisted Solution

by:RobSampson
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>

Regards,

Rob.
0
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

by:DanGettel
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")%>'>
</asp:TableCell>

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>'>
</asp:TableCell>

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

0
 
LVL 65

Assisted Solution

by:RobSampson
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>'>
</asp:TableCell>

Regards,

Rob.
0
 

Accepted Solution

by:
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>
</asp:TableCell>
0

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