Solved

</td>') is not allowed within a 'System.Web.UI.HtmlControls.HtmlTableCellCollection'

Posted on 2013-05-24
5
1,359 Views
Last Modified: 2013-05-26
I am getting this error when using VS 2008 statements in a VS 2012 Website project.

What is the problem and what should I change?

Documentation would be appreciated.

Thanks,


Parser Error Message: Literal content ('<td colspan="2"
              style= "background-color: #FFFFCC;" font-family: Arial, Helvetica,
            sans-serif; font-size: small;"
              class="style2" >
           
            The current day market data is updated each day at 7:00 PM Eastern Standard
            Time.
   
            The Find High Performers and Watch List are not available between 7:00 and 7:30
            PM EST.
          </td>') is not allowed within a 'System.Web.UI.HtmlControls.HtmlTableCellCollection'.

<tr>
Line 248:        <td colspan="2"
Line 249:              style= "background-color: #FFFFCC;" font-family: Arial, Helvetica,
Line 250:            sans-serif; font-size: small;"
0
Comment
Question by:Dovberman
  • 3
5 Comments
 
LVL 10

Expert Comment

by:ecarbone
Comment Utility
you're missing a double quote before the word "Arial
0
 

Author Comment

by:Dovberman
Comment Utility
Should it be:

style= "background-color: #FFFFCC;" font-family: "Arial, Helvetica,  sans-serif; font-size: small;"

Why not:

style= "background-color: #FFFFCC;" "font-family: Arial, Helvetica,  sans-serif; font-size: small;"
0
 
LVL 12

Accepted Solution

by:
Jitendra Patil earned 500 total points
Comment Utility
try this way, i've created a demo page with dynamic style as you desribed above in vs2010.

.aspx code
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />

        <asp:Literal ID="MyLiteral" runat="server"></asp:Literal>
    </div>
    </form>
</body>
</html>


.cs code
protected void Page_Load(object sender, EventArgs e)
        {
           MyLiteral.Text= "<table border="+"1px"+"><tr><td colspan="+"2"+"style="+"background-color: #FFFFCC; font-family: Arial, Helvetica, sans-serif; font-size: small;"+"class="+"style2"+">The current day market data is updated each day at 7:00 PM Eastern Standard Time.The Find High Performers and Watch List are not available between 7:00 and 7:30 PM EST.</td></tr></table>";
        }

hope this helps.
0
 

Author Comment

by:Dovberman
Comment Utility
Thanks, but I found out that these are warnings, not errors.

The warnings have been extensively reported and do not affect performance.
0
 

Author Closing Comment

by:Dovberman
Comment Utility
Thank you.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
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…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This video discusses moving either the default database or any database to a new volume.

762 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

6 Experts available now in Live!

Get 1:1 Help Now