By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,292 Members | 1,381 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,292 IT Pros & Developers. It's quick & easy.

Visual Studio 2005 SP1 warning

P: n/a
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.
Mar 1 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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" <jo***@powerlist.comwrote in message
news:eL**************@TK2MSFTNGP03.phx.gbl...
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.


Mar 1 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.