Visual Studio 2005 SP1 warning

J

John Kotuby

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.
 
J

John Kotuby

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,698
Latest member
LydiaHalle

Latest Threads

Top