473,385 Members | 1,387 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

compiler failed with error code 1.

I have the following code:

<asp:Label ID="Label1" runat="server" Text='<%# "<h2
style=\"Text-Align:Center\">"+Eval("Title")+"</h2><br /><span
style=\"Text-Align:Center\">"+Eval("CreationDate", "{0:f}")+"</span><br
/><span style=\"Text-Align:Center\">"+Eval("Description") + "</span>"
%>'></asp:Label>

I get this error when trying to run the page:

C:\Documents and Settings\Andy\My Documents\Visual Studio
2008\Projects\Eternity Records(VB)\WebRoot\index.aspx(13) : error BC32017:
Comma, ')', or a valid expression continuation expected.
Nov 19 '08 #1
3 3525
After serious thinking Andy B wrote :
I have the following code:

<asp:Label ID="Label1" runat="server" Text='<%# "<h2
style=\"Text-Align:Center\">"+Eval("Title")+"</h2><br /><span
style=\"Text-Align:Center\">"+Eval("CreationDate", "{0:f}")+"</span><br
/><span style=\"Text-Align:Center\">"+Eval("Description") + "</span>"
%>'></asp:Label>

I get this error when trying to run the page:

C:\Documents and Settings\Andy\My Documents\Visual Studio
2008\Projects\Eternity Records(VB)\WebRoot\index.aspx(13) : error BC32017:
Comma, ')', or a valid expression continuation expected.
Your directoryname ("Eternity Records(VB)") seems to suggest that you
use VB. Is \" in VB an escape for "just a quote"? (It *is* in C#).

Do you need to have everything in a single <asp:label>? Or could you
split this expression: have all the Eval's in separate blocks and move
the fixed strings outside the databinding block.

Sort of:
<h2 style="Text-Align:Center"><%# Eval("Title") %></h2><br />
<span style="Text-Align:Center"><%#Eval("CreationDate", "{0:f}") %>
</span><br/>
<span style="Text-Align:Center"><%# Eval("Description") %></span>

Hans Kesting
Nov 20 '08 #2
That is how it needs to be done. Everything has to be inside the label
control and done inside the markup. I don't know what the escape character
for vb is... anybody know?
"Hans Kesting" <ne*********@spamgourmet.comwrote in message
news:uW**************@TK2MSFTNGP02.phx.gbl...
After serious thinking Andy B wrote :
>I have the following code:

<asp:Label ID="Label1" runat="server" Text='<%# "<h2
style=\"Text-Align:Center\">"+Eval("Title")+"</h2><br /><span
style=\"Text-Align:Center\">"+Eval("CreationDate", "{0:f}")+"</span><br
/><span style=\"Text-Align:Center\">"+Eval("Description") + "</span>"
%>'></asp:Label>

I get this error when trying to run the page:

C:\Documents and Settings\Andy\My Documents\Visual Studio
2008\Projects\Eternity Records(VB)\WebRoot\index.aspx(13) : error
BC32017: Comma, ')', or a valid expression continuation expected.

Your directoryname ("Eternity Records(VB)") seems to suggest that you use
VB. Is \" in VB an escape for "just a quote"? (It *is* in C#).

Do you need to have everything in a single <asp:label>? Or could you split
this expression: have all the Eval's in separate blocks and move the fixed
strings outside the databinding block.

Sort of:
<h2 style="Text-Align:Center"><%# Eval("Title") %></h2><br />
<span style="Text-Align:Center"><%#Eval("CreationDate", "{0:f}") %>
</span><br/>
<span style="Text-Align:Center"><%# Eval("Description") %></span>

Hans Kesting


Nov 20 '08 #3
"Andy B" <a_*****@sbcglobal.netwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>>I get this error when trying to run the page:

C:\Documents and Settings\Andy\My Documents\Visual Studio
2008\Projects\Eternity Records(VB)\WebRoot\index.aspx(13) : error
BC32017: Comma, ')', or a valid expression continuation expected.

Your directoryname ("Eternity Records(VB)") seems to suggest that you use
VB. Is \" in VB an escape for "just a quote"? (It *is* in C#).

Do you need to have everything in a single <asp:label>? Or could you
split this expression: have all the Eval's in separate blocks and move
the fixed strings outside the databinding block.

That is how it needs to be done. Everything has to be inside the label
control and done inside the markup. I don't know what the escape character
for VB.NET is... anybody know?
GIYF:
http://www.google.co.uk/search?sourc...cape+character
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Nov 20 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mike Fisher | last post by:
I'm seeing an error when I try to run/debug a web service. Although it doesn't happen every time, it does occur more than half of the times I hit F5. It appears to be returned by the the JIT...
7
by: Matthew Del Buono | last post by:
Don't try to solve the problem. I've found a way -- around or fixing it. I'm just curious as to whether this is Microsoft's problem in their compiler or if there's a standard saying this is to be...
0
by: Rich | last post by:
I get this message when running almost every time I do an incremental compile. A full rebuild makes it go away. A subsequent incremental compile causes the problem again. I've read posts...
1
by: Razzie | last post by:
Hi all, I was working on a little project, worked fine, but now all of a sudden I get: The compiler failed with error code -1073741502 as an error message (when running the site, not...
2
by: Roger Wang | last post by:
HELP!!!! We have got a W2k server running IIS5 with .NET framework 1.1 and .NET framework SP1. All ASP.NET applications cannot run on this box. It all returned with the same error: ...
1
by: bhanupoornakumar | last post by:
Hi .. when i am setting a website i am getting the following error.. The compiler failed with error code -1073741819. This is the full error .. u can see below. Compilation Error ...
7
by: Mark Carrington | last post by:
I'm developing a web app in .NET 2 using C#, and occasionally see this error, apparently something to do with the theme used on the site: Compiler Error Message: The compiler failed with error...
0
by: Ken | last post by:
Anyone know how to fix this error? Server Error in '/' Application. -------------------------------------------------------------------------------- Failed to load JIT compiler Description:...
27
by: Dave | last post by:
I'm having a hard time tying to build gcc 4.3.1 on Solaris using the GNU compilers. I then decided to try to use Sun's compiler. The Sun Studio 12 compiler reports the following code, which is in...
1
by: kmsandeep17 | last post by:
when i host my site on go daddy it give error Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.