Connecting Tech Pros Worldwide Forums | Help | Site Map

Concatenating Data Items

OutdoorGuy
Guest
 
Posts: n/a
#1: Apr 26 '07
Greetings,

I have the following code in an .aspx web page and am receiving the
error: "Compiler Error Message: CS1026: ) expected". I can't see where
it is expecting an extra parenthesis. The line of code it fails on is
the following:

<asp:Label id=lblName runat="server" Text='<%#
DataBinder.Eval(Container,"DataItem.FirstName") + " " +
DataBinder.Eval(Container,"DataItem.LastName"); %>'>
</asp:Label>

I'm simply trying to concatenate the first name and last name in a data
list. Any ideas as to what I am doing wrong?

Thanks in advance!



*** Sent via Developersdex http://www.developersdex.com ***

Evertjan.
Guest
 
Posts: n/a
#2: Apr 26 '07

re: Concatenating Data Items


OutdoorGuy wrote on 26 apr 2007 in microsoft.public.inetserver.asp.general:
Quote:
I have the following code in an .aspx web page and am receiving the
error: "Compiler Error Message: CS1026: ) expected". I can't see where
it is expecting an extra parenthesis. The line of code it fails on is
the following:
>
<asp:Label id=lblName runat="server" Text='<%#
DataBinder.Eval(Container,"DataItem.FirstName") + " " +
DataBinder.Eval(Container,"DataItem.LastName"); %>'>
</asp:Label>
>
I'm simply trying to concatenate the first name and last name in a data
list. Any ideas as to what I am doing wrong?
>
Thanks in advance!
>
This is a classic asp group.

Dotnet questions should be asked in

<microsoft.public.dotnet.framework.aspnet>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
OutdoorGuy
Guest
 
Posts: n/a
#3: Apr 27 '07

re: Concatenating Data Items


Thanks. I appreciate it.


*** Sent via Developersdex http://www.developersdex.com ***
Closed Thread