Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / August 2007

Tip: Looking for answers? Try searching our database.

Convert to Web Application

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rick - 07 Aug 2007 22:10 GMT
I'm converting a large web application from VS2003 - VS2005. I right clicked
on the web project and selected convert to web application. The conversion
created a designer file for each .aspx file. Everywhere in the code behind
that we are using me.[controlname]. I'm getting and error:
'[Controlname]' is not a member  'Webproject.pagename'.

What do I need to do to get around this without having to go to each page
and add the reference to the control back into the page?

Thanks in advance!
Walter Wang [MSFT] - 08 Aug 2007 04:03 GMT
Hi Rick,

Based on my understanding, you're migrating a VS2003 web project to VS2005
using the Web Application Project type.

First, if you haven't read the guide on the convertion here, I recommend
you to read it:

#Migrating a VS 2003 Web Project to VS 2005
http://webproject.scottgu.com/CSharp/Migration/Migration.aspx

From the guide, in step 8: Convert to Partial Classes:

<quote>
When you migrate your project using the above steps, none of your
code-behind page code or classes are modified. This means that the code
should look (and work) just like it did in VS 2003. This makes it much
easier to migrate existing code to VS 2005.

You can optionally choose to keep your code in this format. Doing so will
require you to manually update the control field declarations within your
code-behind file -- but everything else will work just fine in VS 2005.
</quote>

This means converting to the partial classes mode is optional, the migrated
web application should be working fine without this.

Please confirm if this is working correctly on your side if you don't run
the action "Convert To Web Application".

Further down the guide, it also mentioned that:

<quote>
If for some reason the .designer.cs file doesn't have a control declaration
added, you can manually declare it within the code-behind file of the page
(just like you would in VS 2003). One issue we've sometimes seen reported
are cases where a developer has specifically overriden the type of a
Usercontrol declaration in a VS 2003 code-behind file (for example:
MyControl1 instead of the generic UserControl base class), and the type
isn't correctly transferred to the .designer.cs file (producing a compile
error). If the correct user-control type declaration isn't added to the
designer.cs file, you can optionally just delete it from the .designer.cs
and add it the code-behind file of the page instead. VS 2005 will then
avoid re-adding it to the .designer.cs file (it first looks in the
code-behind file for declarations before updating the .designer.cs file on
changes).
</quote>

Please check if the controls you mentioned that having the issue are of
this type: if you've specifically overridden the type of the UserControl,
then the migration wizard will not create them in the designer file.

If you think the guide doesn't help or your project has some specific
issues, please help me to further troubleshoot this by sending me a smaller
but still reproducible project. Thank you for the trouble in advance.

Sincerely,
Walter Wang (wawang@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
For MSDN subscribers whose posts are left unanswered, please check this
document: http://blogs.msdn.com/msdnts/pages/postingAlias.aspx

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express/Windows Mail, please make sure
you clear the check box "Tools/Options/Read: Get 300 headers at a time" to
see your reply promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Walter Wang [MSFT] - 13 Aug 2007 02:25 GMT
Hi Rick,

I'm writing to check the status of this post. Please feel free to let me
know if there's anything else I can help. Thanks.

Regards,
Walter Wang (wawang@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.