Search

Bug in generating the designer.cs file in VS2010 (Converting VS2008 project to VS2010) by MikeVenkata

Active

8
0
Sign in
to vote
Type: Bug
ID: 536000
Opened: 2/24/2010 11:35:19 AM
Access Restriction: Public
1
Workaround(s)
4
User(s) can reproduce this bug
The auto-generated designer.cs file did not create the controls inside the Tab Container.

ASPX Page

<%@ Page Language="C#" AutoEventWireup="True" CodeBehind="Test4.aspx.cs" Inherits="WebFI_Main.Test4" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <cc1:TabContainer ID="testTBC" AutoPostBack="true" runat="server">
            <cc1:TabPanel ID="testTBP" runat="server">
                <ContentTemplate>
                    <asp:Panel ID="testPnl" runat="server">
                        <asp:TextBox ID="testTxtBox" runat="server">
                        </asp:TextBox>
                    </asp:Panel>
                </ContentTemplate>
            </cc1:TabPanel>
        </cc1:TabContainer>    
    </div>
    </form>
</body>
</html>

Designer file output

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace WebFI_Main {
    
    
    public partial class Test4 {
        
        /// <summary>
        /// form1 control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.HtmlControls.HtmlForm form1;
        
        /// <summary>
        /// testTBC control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::AjaxControlToolkit.TabContainer testTBC;
    }
}
Details (expand)

Product Language

English

Version

Visual Studio 2010 Release Candidate

Operating System

Windows XP

Operating System Language

English

Steps to Reproduce

1. Open an existing VS2008 project into the VS2010
2. Create a new aspx file and add the code as mention in the description with AjaxControlToolKit (3.0) TabContainer, TabPanel and asp Panel and text box.
3. VS2010 generates the designer.cs file
4. No Ajax tab panel and no asp controls within the tab panel are listed here.

Actual Results


No Ajax tab panel and no asp controls within the tab panel are listed here. You can reproduce this issue even with the new VS2010 project.

Expected Results

Step 4 should have all the design view controls. Are there any issues with the AjaxControlToolKit 3.0 and the Visual Studio 2010?
      You can indicate your satisfaction with how Microsoft handled this issue by completing this quick 3 question survey. [Details]

 

File Attachments
0 attachments
Sign in to post a comment.
Posted by Vs2010Dummy on 10/11/2010 at 1:04 PM
Hi, I have same problem with VS2010 RTM, hotfix workrd with RC, but cannot apply to RTM on X64 Win 7,
any suggestions?, we have several hundred pages with this problem.
Posted by frogydev on 8/12/2010 at 11:41 PM
Hello, I have the same problem with VS2010 Profesional - designer.cs file is generated incorectly. I've tried to install pacth KB981167 but this error occured: KB981167 does not apply, or is blocked by another condition on your computer.
Posted by howardr851 on 5/25/2010 at 9:58 AM
I have similar problems as @alphadoom. We are still using .Net 3.5 in VS 2010. When working on an aspx page, designer file types get updated incorrectly:

Global.System.Web.UI.WebControls.Label

becomes

Global.System.Web.UI.WebControls.WebParts.Label

This happens with several controls on everypage. Very annoying. We just have to do a search for "WebParts." and replace all with ""
Posted by tbrownell3 on 5/11/2010 at 2:53 PM
I have ran into this problem also. In our current solution anytime we make a change to the .aspx page our .designer.cs file for that page doesn't build. Our .designer.cs entries are changed from:

protected global::System.Web.UI.WebControls.Label lbl_foo

to

protected global::System.Web.UI.Label lbl_foo

This behavior happens when we type, drag from toolbox or copy and paste a control on the page.
Posted by Microsoft on 3/10/2010 at 2:52 PM
@StoreAdmin can you open a separate connect bug on this issue and attach a sample project that repros the issue?
Posted by StoreAdmin on 3/10/2010 at 11:23 AM
I am having similar problem, not just nested controls, but any simple controls like textbox. I add to the design view, but it does not appear in code behind page. My web c# solution wasn't created in vs2010 however. It was created in vs2005 then imported/upgraded into vs2010. However, initially I selected the wrong project type, something like "Web Project - coding only". Then I switched to "Web Project - coding and design". Could the design-code linkage have gotten lost in the process? I downloaded the fix mentioned here, but that didn't help
Posted by Microsoft on 3/5/2010 at 2:22 PM
A patch for this issue for Visual Studio 2010 RC is now available for download:
http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=27117
Posted by Microsoft on 2/25/2010 at 1:35 PM
We are actively working on a fix for this issue and looking into the possibility of releasing a patch for the RC release. If we are able to publish a patch for this issue, it will be publicized on http://blogs.msdn.com/webdevtools

In the meantime, we have published information about a workaround here:
http://blogs.msdn.com/webdevtools/archive/2010/02/18/workaround-missing-declarations-for-controls-in-designer-file.aspx
Posted by Microsoft on 2/24/2010 at 7:03 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Posted by DigitForge on 2/24/2010 at 11:49 AM
I believe this is the same bug as https://connect.microsoft.com/VisualStudio/feedback/details/533302/issue-with-auto-generated-designer-files-not-addding-components (and a couple other reported versions of this issue). If so, please go to that bug and add your vote for it so it is brought to their attention.
Sign in to post a workaround.
Posted by dundrum on 9/10/2010 at 6:39 AM
This problem can be resolved by cut the contents in the aspx page and save it. Then delete the contents of the designer page and save it; and then paste back the contents of the aspx page onto the aspx page and save it. This will generate the designer page . This should work. Let me know if you still have any issues.

Well done boys!!!!!!!!!!