Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…

824 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