Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2013-05-24
5
Medium Priority
?
1,610 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 13

Accepted Solution

by:
Jitendra Patil earned 2000 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

Independent Software Vendors: 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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

721 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