怎样包括中用runat = THEAD"服务器"表元素? [英] How do I include thead in a runat="server" table element?

查看:214
本文介绍了怎样包括中用runat = THEAD"服务器"表元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我升级从Visual Studio 2010中一个大的网站项目至2012年在我的项目,我有 RUNAT =表元素服务器属性。许多这些有 THEAD 其中的元素。当我在2012年打开它,并尝试建立,我得到以下错误:

I'm upgrading a big web site project from Visual Studio 2010 to 2012. Throughout my project, I have table elements with the runat="server" attribute. Many of these have thead elements inside of them. When I open it in 2012 and and try to build, I get the following error:

Value of type 'System.Web.UI.HtmlControls.HtmlGenericControl' cannot be converted to 'System.Web.UI.HtmlControls.HtmlTableRow'

删除 =服务器属性或注释掉 THEAD 修复它。注释掉只有 TR THEAD 不解决它里面的元素。下面是重现问题一个简单的例子:

Removing the runat="server" attribute or commenting out thead fixes it. Commenting out only the tr element inside of thead does not fix it. Here is a simplified example that reproduces the problem:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Test.aspx.vb" Inherits="Test" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table id="Example" runat="server">
            <thead>
                <tr>
                    <th>test</th>
                </tr>
            </thead>
        </table>
    </div>
    </form>
</body>
</html>

元素打开发生错误。

我怎样才能解决这个问题而不做下列之一?

How can I fix this without doing one of the following?


  • 删除 =服务器属性

  • 删除 THEAD 元素

  • 将其更改为一个 ASP:表元素

  • Removing the runat="server" attribute
  • Removing the thead element
  • Changing it to an asp:table element

奖金高达投票的人谁解释了什么是2012年做的不同,是造成这一点。

Bonus up vote for someone who explains what 2012 is doing differently that is causing this.

更新:

问题不会出现在网页的应用的,仅在一个网站。

The problem does not occur in a web app, only in a web site.

该项目实际上并没有升级,只是我的开发环境。在这两种情况下,我使用的是4.0框架

The project isn't actually be upgraded, just my development environment. In both cases, I'm using the 4.0 framework

我尝试使用4.5框架,但它并没有帮助。

I tried using the 4.5 framework, but it didn't help.

2012年9月10日:
我有一个开放的情况下,与微软的支持。他们的开发团队正在调查这件事。

Sept 10th, 2012: I have an open case with Microsoft support. Their dev team is looking into it.

十月24,2012:
由于.NET 4.5取代4.0,我不能再编译在VS 2010中也。我遇到的问题是纯粹的.NET - 不Visual Studio的。

Oct. 24, 2012: Since .NET 4.5 replaces 4.0, I can no longer compile in VS 2010 also. The problem I am experiencing is purely .NET - not Visual Studio.

推荐答案

修正了现在这个问题是可用的。
http://support.microsoft.com/kb/2750149 为Windows 8和的 http://support.microsoft.com/kb/2750147 为Windows 7平台。

Fix for this issue is available now. http://support.microsoft.com/kb/2750149 for windows 8 and http://support.microsoft.com/kb/2750147 for Windows 7 platform.

这篇关于怎样包括中用runat = THEAD&QUOT;服务器&QUOT;表元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆