Convert to Web Application

R

Rick

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!
 
W

Walter Wang [MSFT]

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 ([email protected], 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.
 
W

Walter Wang [MSFT]

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 ([email protected], 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.
 

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,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top