Solved

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

Posted on 2013-05-24
5
1,509 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
[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
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

732 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