473,660 Members | 2,468 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Control Declarations Disappear from ASP.NET 1.1 to ASP 2.0

I've just begun converting some websites from ASP.NET 1.1 to ASP.NET 2.0.
I'm consistently losing web control declarations when converting aspx pages.

All declarations like this disappear and I need to re-type them manually...
Protected WithEvents hrFile As System.Web.UI.H tmlControls.Htm lAnchor

This occurs when I use the conversion wizard, and when I manually copy/paste
an aspx file into a 2.0 project.

Is this common? Is there a way to retain these declarations when converting?

Thanks.
Oct 3 '06 #1
3 1194
Try switching to the Web Application Project add-in, if you haven't
downloaded and installed it:

http://msdn2.microsoft.com/en-us/asp.net/aa336618.aspx

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Mike" wrote:
I've just begun converting some websites from ASP.NET 1.1 to ASP.NET 2.0.
I'm consistently losing web control declarations when converting aspx pages.

All declarations like this disappear and I need to re-type them manually...
Protected WithEvents hrFile As System.Web.UI.H tmlControls.Htm lAnchor

This occurs when I use the conversion wizard, and when I manually copy/paste
an aspx file into a 2.0 project.

Is this common? Is there a way to retain these declarations when converting?

Thanks.
Oct 3 '06 #2
Thank you very much!

"Peter Bromberg [C# MVP]" wrote:
Try switching to the Web Application Project add-in, if you haven't
downloaded and installed it:

http://msdn2.microsoft.com/en-us/asp.net/aa336618.aspx

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Mike" wrote:
I've just begun converting some websites from ASP.NET 1.1 to ASP.NET 2.0.
I'm consistently losing web control declarations when converting aspx pages.

All declarations like this disappear and I need to re-type them manually...
Protected WithEvents hrFile As System.Web.UI.H tmlControls.Htm lAnchor

This occurs when I use the conversion wizard, and when I manually copy/paste
an aspx file into a 2.0 project.

Is this common? Is there a way to retain these declarations when converting?

Thanks.
Oct 3 '06 #3
they disappear because they are not needed.

in 1.0 the aspx class inherited from the codebehind, so for both the
codebehind and asp code to see the same control, if had to be defined tin
the base class.

in 2.0 the code behind and the aspx code are partial classes (no
inheritance) so a control defined in aspx is defined in the code behind by
definition. you can also create server routines in script blocks in the aspx
page, and call then from the codebehind.

-- bruce (sqlwork.com)

"Mike" <Mi**@discussio ns.microsoft.co mwrote in message
news:30******** *************** ***********@mic rosoft.com...
I've just begun converting some websites from ASP.NET 1.1 to ASP.NET 2.0.
I'm consistently losing web control declarations when converting aspx
pages.

All declarations like this disappear and I need to re-type them
manually...
Protected WithEvents hrFile As System.Web.UI.H tmlControls.Htm lAnchor

This occurs when I use the conversion wizard, and when I manually
copy/paste
an aspx file into a 2.0 project.

Is this common? Is there a way to retain these declarations when
converting?

Thanks.

Oct 3 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
23932
by: curious | last post by:
I am new to VB.NET and I need help in using timer control. Here is the scenario. I have 3 labels (label 1, label2, label 3), and a start button, all vertically aligned on the form. Using a timer control with interval value of 3000, i.e 3 second, I want to accomplish the following: - Initially, only START button is visible to the user, i.e the 3 labels are set to be invisible. - When click on START button, the button disappear and...
3
2689
by: Bryan Capps | last post by:
I have a text box control on a form, the value of which is calculated (concatenated) from entries on a subform. Accordingly, I've set the control's locked property to true and the tab stop property to false. The latter setting makes the control completely disappear. FYI, the form is dialog border style. When set to sizable border style, the control only appears when the form is re-sized much larger. I have a similar form with a...
0
1062
by: foldface | last post by:
Hi I have an odd problem with a user control. - I have an asp page which holds a single usercontrol. - On that user control I have a button and placeholder. When the button is pressed I want a user control to loaded into the placeholder. - I do this by having a flag which is set by the button logic. If in the PreRender call the flag is set then the control is loaded. I do this in the PreRender stage because I want to make sure the...
5
1004
by: Nathan Sokalski | last post by:
My teammate on a project somehow removed all the control declarations in a project. Since most of the control declarations are added automatically when the controls are added, is there a way to have Visual Studio add them again? (my project is ASP.NET/VB) Thanks. -- Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/
0
3930
by: tony | last post by:
Hello! This is a rather long mail but it's a very interesting one. I hope you read it. I have tried several times to get an answer to this mail but I have not get any answer saying something like this is a bug or that .NET doesn't support what I trying to do. I hope that one that is is microsoft certified read this because this must be a bug.
3
2814
by: vivela | last post by:
hi, I hope you could help me out on this one,cause I have been trying for 4 days to solve it,but couldn't quite get it right: I have an ASP textbox that should change the value in a dropdownlist. this happens,but the problem is with the validation of the ddl.it has a requiredfieldvalidator,and the error message disapears only if i select a value from the dropdownlist,even though it should also disapear when I write a valid name in the...
15
6505
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt accept other controls. The control i drag drop on it becomes the child of my custom control's parent form and not the child of my custom control. Then i added this line "" before my custom control class (i dont know what this line does). Now
1
1977
by: rizwanahmed24 | last post by:
Hello i have created a custom control. i have placed two template controls on it. One is check box and second is picture box. The custom control also contain two picture boxes as property. These picture boxes can be filled at design time. I want my custom control to act as container. I drag the controls from toolbox on my custom control. Everything is fine so far. But when i compile the application the two template controls i mentioned...
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8630
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7360
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6181
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4176
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2759
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1982
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1739
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.