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,533 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
[X]
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
  • 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
Tutorials alone can't teach real engineering

So we built better training tools.

-Hands-on Labs
-Instructor Mentoring
-Scenario-Based Tests
-Dedicated Cloud Servers

All at your fingertips. What are you waiting for?

 

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

688 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