怎样包括中用runat = THEAD"服务器"表元素?

编程入门 行业动态 更新时间:2024-10-28 12:24:41
本文介绍了怎样包括中用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="www.w3/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.

推荐答案

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

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

更多推荐

怎样包括中用runat = THEAD&QUOT;服务器&QUOT;表元素?

本文发布于:2023-06-08 03:58:41,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/576219.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:中用   元素   服务器   THEAD   runat

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!