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,528 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

747 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now