Visual Studio 2005 SP1 warning

Discussion in 'ASP .Net' started by John Kotuby, Mar 1, 2007.

  1. John Kotuby

    John Kotuby Guest

    Hi all,
    I have experienced several problems after installing SP1 for Visual Studio
    2005 Professional. The problems are occurring on 2 different Windows XP SP2
    development machines that have been serviced packed. I am working on an
    ASP.NET 2.0 Web Application in Visual Basic.

    1. Publicly declared user controls on the Master page are no longer being
    recognized by Intellisense. Webforms that were created before SP1 are still
    working fine using the syntax Master.UserWelcome -- UserWelcome in this case
    representing a publicly declared property on the Master Page which
    references a user control. Here is the code...

    -------------------------------------------
    Public Property UserWelcome() As UserControl
    Get
    Return UserWelcome1
    End Get
    Set(ByVal value As UserControl)
    UserWelcome1 = value
    End Set
    End Property
    --------------------------------------------

    And the code to reference the control from within a Web Form that uses the
    Master page.

    -----------------------------------
    Dim mpUserNameLabel As Label
    mpUserNameLabel = CType(Master.UserWelcome.FindControl("UserName"), Label)
    If Not mpUserNameLabel Is Nothing Then
    mpUserNameLabel.Text = CType(Session("UserName"), String)
    End If
    ----------------------------------
    Again I stress, this is code that I pulled from the project. It still works
    fine in Web Forms created before SP1 in the same project. When I try to
    apply the same code to any new Form in the same project using the same
    Master Page I get an error: 'UserWelcome' is not a member of
    'System.Web.UI.MasterPage'.

    I have had to use a workaround.... "Microsoft Techs what gives?"
    ---------------------------------
    usrWelcome = CType(Master.FindControl("UserWelcome1"), UserControl)
    If Not usrWelcome Is Nothing Then
    mpUserNameLabel = CType(usrWelcome.FindControl("UserName"), Label)
    If Not mpUserNameLabel Is Nothing Then
    mpUserNameLabel.Text = CType(Session("UserName"), String)
    End If
    End
    ----------------------------

    Lastly, I have notified Microsoft and they are investigating. I tried to
    reproduce the same error in a brand new project, but a couple other problems
    popped up, not even allowing me to get that far.

    1. Creating a new Web Form does not show me the checkboxes for Code Behind
    or Use MasterPage.
    2. A newly created webform throws an error underlining the declaration
    "CodeBehind = default.aspx.vb" telling me that the file cannot be found.
    3. Upon startup the VS 2005 splash screen shows only 256 colors.

    If you see any of this behavior in your VS 2005 Pro install ... then you
    have a problem.
    My plan is to uninstall the SP1 then Uninstall VStudio 2005 and re-install
    from scratch.
    Note that this problem has occurred on 2 different development workstations.

    Good luck to all and I sincerely hope that nobody else is having a problem
    with SP1.
    John Kotuby, Mar 1, 2007
    #1
    1. Advertising

  2. John Kotuby

    John Kotuby Guest

    Ladies and Gentlemen,

    Thank you all for not flaming me too badly on this one. Microsoft Support
    finally showed me that they are making an effort to be more Developer
    friendly.

    Two things resulted in the "errors" I was experiencing.

    1. With SP1 the new option of opening up an ASP.NET Web Application was
    introduced into the IDE. I had not installed that option earlier and
    therefore was not familair with it. When a project is opened as a "Web
    Application", rather than a "Web Site" (finely grained distinction), the
    check boxes for Code Behind and Master Page are not available. The tech
    support guy said that the IDE reverts somewhat back to VS 2003 style. So
    much for that problem.

    2. I was forgetting to place an important directive into my newly created
    Web Forms.

    <%@ MasterType VirtualPath="~/PowerCard.master" %>

    Must be placed at the top of the form in order to access the publically
    exposed user controls on the Master Page as Properties. That is a lesson I
    shall not soon forget.

    The upshot... If you can't take a vacation then at least take a deep breath.

    I hope this entry will be as instructive to others as it has been to me.

    Thanks all for your patience.

    "John Kotuby" <> wrote in message
    news:...
    > Hi all,
    > I have experienced several problems after installing SP1 for Visual Studio
    > 2005 Professional. The problems are occurring on 2 different Windows XP
    > SP2 development machines that have been serviced packed. I am working on
    > an ASP.NET 2.0 Web Application in Visual Basic.
    >
    > 1. Publicly declared user controls on the Master page are no longer being
    > recognized by Intellisense. Webforms that were created before SP1 are
    > still working fine using the syntax Master.UserWelcome -- UserWelcome in
    > this case representing a publicly declared property on the Master Page
    > which references a user control. Here is the code...
    >
    > -------------------------------------------
    > Public Property UserWelcome() As UserControl
    > Get
    > Return UserWelcome1
    > End Get
    > Set(ByVal value As UserControl)
    > UserWelcome1 = value
    > End Set
    > End Property
    > --------------------------------------------
    >
    > And the code to reference the control from within a Web Form that uses the
    > Master page.
    >
    > -----------------------------------
    > Dim mpUserNameLabel As Label
    > mpUserNameLabel = CType(Master.UserWelcome.FindControl("UserName"), Label)
    > If Not mpUserNameLabel Is Nothing Then
    > mpUserNameLabel.Text = CType(Session("UserName"), String)
    > End If
    > ----------------------------------
    > Again I stress, this is code that I pulled from the project. It still
    > works fine in Web Forms created before SP1 in the same project. When I try
    > to apply the same code to any new Form in the same project using the same
    > Master Page I get an error: 'UserWelcome' is not a member of
    > 'System.Web.UI.MasterPage'.
    >
    > I have had to use a workaround.... "Microsoft Techs what gives?"
    > ---------------------------------
    > usrWelcome = CType(Master.FindControl("UserWelcome1"), UserControl)
    > If Not usrWelcome Is Nothing Then
    > mpUserNameLabel = CType(usrWelcome.FindControl("UserName"), Label)
    > If Not mpUserNameLabel Is Nothing Then
    > mpUserNameLabel.Text = CType(Session("UserName"), String)
    > End If
    > End
    > ----------------------------
    >
    > Lastly, I have notified Microsoft and they are investigating. I tried to
    > reproduce the same error in a brand new project, but a couple other
    > problems popped up, not even allowing me to get that far.
    >
    > 1. Creating a new Web Form does not show me the checkboxes for Code Behind
    > or Use MasterPage.
    > 2. A newly created webform throws an error underlining the declaration
    > "CodeBehind = default.aspx.vb" telling me that the file cannot be found.
    > 3. Upon startup the VS 2005 splash screen shows only 256 colors.
    >
    > If you see any of this behavior in your VS 2005 Pro install ... then you
    > have a problem.
    > My plan is to uninstall the SP1 then Uninstall VStudio 2005 and re-install
    > from scratch.
    > Note that this problem has occurred on 2 different development
    > workstations.
    >
    > Good luck to all and I sincerely hope that nobody else is having a problem
    > with SP1.
    >
    >
    John Kotuby, Mar 1, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ad
    Replies:
    5
    Views:
    1,229
  2. rockdale
    Replies:
    1
    Views:
    558
    Juan T. Llibre
    Aug 23, 2006
  3. Smokey Grindel

    Visual Studio 2005 SP1 includes AJAX?

    Smokey Grindel, Jan 8, 2007, in forum: ASP .Net
    Replies:
    10
    Views:
    601
    Juan T. Llibre
    Jan 8, 2007
  4. MSNEWS
    Replies:
    0
    Views:
    257
    MSNEWS
    Apr 21, 2007
  5. Nathan Sokalski
    Replies:
    1
    Views:
    582
    Juan T. Llibre
    May 15, 2007
Loading...

Share This Page