From: http://support.microsoft.com/kb/941824
Symptoms
Consider the following scenario: you create a Microsoft ASP. NET 2.0 web applicat...
Consider the following scenario:
- You create a Microsoft ASP. NET 2.0 web application.
- You add markup that resembles the following to the web page.
<body><form id="form1" runat='server"><Table ID="Tablename" runat="server" Height="224px" Width="399px"><tbody ID="tbodyname" runat="server"></tbody></Table></form></body>
- You build the application by using Microsoft Visual Studio 2005.
- You Install the Microsoft. NET Framework 3.5.
- You open the project in Visual Studio 2005 and then build the application.
In this scenario, you receive an error message that resembles the following:
ASP. NET runtime error: The base class includes des the field' Tbodyname', But its type (system. Web. UI. htmlcontrols. htmlgenericcontrol) is not compatible with the type of control (system. Web. UI. htmlcontrols. htmltablebodysection ).
Back to the top
Cause
In the. NET Framework 3.5, the following HTML tags no longer map to the htmlgene...
In the. NET Framework 3.5, the following HTML tags no longer map toHtmlgenericcontrolClass:
In the. NET Framework 3.5, these tags map to the following classes:
Collapse this tableexpand this table
| Tag |
Class |
| Tbody |
Htmltablebodysection |
| Thead |
Htmltableheadersection |
| Tfoot |
Htmltablefootersection |
This change enables the layout options of the newListviewControl.
NoteWhen you install the. NET Framework 3.5, the. NET Framework files in the v2.0.50727 folder are updated. Therefore, when you install the. NET Framework 3.5, Visual Studio 2005 is affected.
Back to the top
Resolution
To resolve this problem, update the web page so that the HTML tags map to the ne...
To resolve this problem, update the web page so that the HTML tags map to the new classes. you can do this manually. or, you can use the Visual Studio 2005 designer to do this automatically.
Back to the topManual method
To manually resolve this problem, follow these steps:
- In Visual Studio 2005, openPagename. Aspx. Designer. CS file.
NoteThe placeholderPagenameRepresents the name of the web page on which you encounter the problem.
- Locate the entries forTbody,Thead, AndTfootTags.
- Change the entries to map these tags to the new classes. For example, make the following changes.
Old entry
protected global::System.Web.UI.HtmlControls.HtmlGenericControl tbodyname;
New entry
protected global::System.Web.UI.HtmlControls.HtmlTableBodySection tbodyname;
- SavePagename. Aspx. Designer. CS file.
Back to the topAutomatic Method
To automatically resolve this problem by using the Visual Studio 2005 designer, follow these steps:
- In Visual Studio 2005, openPagename. Aspx file.
NoteThe placeholderPagenameRepresents the name of the web page on which you encounter the problem.
- In the source window, locate<Table>And</Table>Tags, and then select all entries in the range that includes des these tags.
- OnEditMenu, clickCut. This operation removes the corresponding entries fromPagename. Aspx. Designer. CS file.
- Keep the cursor in the same location.
- OnEditMenu, clickPaste. This operation adds the entries that inherit the new classes back toPagename. Aspx. Designer. CS file.
- SavePagename. Aspx file.
Back to the top