Solved

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

Posted on 2013-05-24
5
1,431 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
ID: 39195897
you're missing a double quote before the word "Arial
0
 

Author Comment

by:Dovberman
ID: 39196228
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
ID: 39196333
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
ID: 39197935
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
ID: 39197937
Thank you.
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

Suggested Solutions

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
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…

810 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