DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Tue, 7 Aug 2007 16:10:47 -0500,    posted on: microsoft.public.dotnet.framework.aspnet        back       

Thread Index
  1    Rick am
          2    (Walter Wang [MSFT])
                 3    (Walter Wang [MSFT])


Convert to Web Application   
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!
Date:Tue, 7 Aug 2007 16:10:47 -0500   Author:  

RE: Convert to Web Application   
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.
Date:Wed, 08 Aug 2007 03:03:06 GMT   Author:  

RE: Convert to Web Application   
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.
Date:Mon, 13 Aug 2007 01:25:44 GMT   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us