473,732 Members | 2,219 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem Using HTML Controls in ASP.Net (with Designer)

I've run into a problem on a couple of projects that I think I've
identified - but would like confirmation of what I think is going on. Also
interested in any fast solutions to fix the user controls/pages that
resulted from this.

On these projects the page design was done with designers who used pure HTML
with an HTML editing tool outside of Visual Studio.

The developers then created the empty pages/user controls, copied the HTML
code into the ASP text, made some minor changes to make the pages/user
controls basically work, then went on their way. As long as the pages/user
controls weren't loaded into Designer, they seemed to function properly.
They built and ran as expected.

When these pages/user controls were opened for editing in Designer, though,
some of them behaved oddly. As soon as they were opened Visual Studio wanted
to check them out. It then made changes to the code, sometimes adding
controls that weren't wanted, sometimes other changes. A common example is
that some pages using user controls added a label definition (Label1) to the
page. Only the label declaration was added. It was never instantiated nor
used in any other way.

My suspicion is that when controls are added within the Designer or removed
that related additions and deletions are made to the associated resource
file. Since these controls were added only in the ASP code the Designer
didn't recognize that the resource files had to be updated as well - so the
code and resources were no longer in sync.

So, as long as the developer fixed the problems, built the project, and
checked the working version into SourceSafe, everything would appear to be
working properly. But the next time a developer reopened the item in the
Designer it found the resources didn't match the code and made an attempt
(adding the label) to try and fix the problem - anyway, that's my hunch.

1. Can anyone confirm to me that this is what's actually going on here?
2. If so, can you point me to an easy way to fix these files?
3. Does anyone know if the next version of Visual Studio will exhibit a
similar problem? ...Or will it be smart enough to fix it automatically?

Thank you.
Nov 19 '05 #1
1 1600
JV
I can't confirm anything about VS inner workings, but I have seen similar
problems. I think this is a case of "Karate do yes, or Karate do no,
Daniel-san". Use one development tool or the other but not both?

I do know that Visual studio is nearly always reformatting the HTML of a
page when you open it in the designer. Sometimes it does a good job, but
plenty of times it messes up your nicely formatted html (annoying if you did
it by hand). Maybe with XHTML it can do a better job, but I haven't had
time to check out 2.0.

It also does a number of other things. I am not sure exactly what it does
with the .res file, but it definitely does try to keep those things in
synch. At least for C# it may also generate class variables for the form if
you have any controls which have the ID field set and runat="server"
declared.

It probably does other arcane things of which I am not aware.

"E. Tom Jorgenson" <ET****@Hotmail .Com>
I've run into a problem on a couple of projects that I think I've
identified - but would like confirmation of what I think is going on. Also
interested in any fast solutions to fix the user controls/pages that
resulted from this.

On these projects the page design was done with designers who used pure
HTML with an HTML editing tool outside of Visual Studio.

Nov 19 '05 #2

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

Similar topics

22
1985
by: Marina | last post by:
Hi, Consider the following situation I have the following routine running repeatedly (curControl is a UserControl with say 1000 textboxes and a big array of strings): Public Sub AddControl(ByVal ctlName As String) If Not IsNothing(curControl) Then Me.Controls.Remove(curControl) End If
1
4025
by: Rhy Mednick | last post by:
I'm creating a custom control (inherited from UserControl) that is displayed by other controls on the form. I would like for the control to disappear when the user clicks outside my control the same way a menu does. To do this my control needs to get notified when the user tried to click off of it. The Leave and LostFocus events of the UserControl work most of the time but not always. For example, if they click on a part of the form...
1
2522
by: Joe Bloggs | last post by:
I am trying display the contents of a table in a web page, select certain rows from that table and then display the fields that I have selected (now table columns) as text in a Label object. Amazingly I have managed to display the table - no problem, I can select rows - no problem, BUT I can't work out how to display more than one of the fields (now columns in the table in the web page). I can display one field OK, but not more than one...
0
1893
by: 42 | last post by:
I implemented a simple class inherited from Page to create a page template. It simply wraps some trivial html around the inherited page, and puts the inherited page into a form. The problem I have run into is that the emitted html at the end of the process is slightly different and doesn't work. Please don't be put off by all the source code. All the guts are in this first base class, and it doesn't do much. The rest is trivial...
5
3159
by: Marcel Gelijk | last post by:
Hi, I am trying to create a User Control that is located in a seperate class library. The User Control contains a textbox and a button. The page generates an exception when it tries to access the code variable that are supposed to be linked to the contained controls. It runs fines when everything is contained in a single web form project. What do I need to do to make it work from a class library?
1
2323
by: Kris van der Mast | last post by:
Hi, been a while since I posted a question myself instead of trying to help others out. I'm refactoring an existing web app that uses dynamic loading of user controls and a lot of response.redirects to the same page. Because I hate the overhead by doing this I'm searching for a cleaner option. But I'm having troubles (off course or I wouldn't be posting this).
3
2343
by: Ankit Aneja | last post by:
I have a strange situation and I have no idea how to solve this. Its a Recruitment Search Page,in the Admin Page, for every button click event the Admin Person has to create a checkbox on the users page. So whenever the Admin person comes to know about the new category in the market he will be adding as different Sub-Categories for example ABAP, BDC etc..etc.. on every click event as Checkboxes. And these controls(checkboxes) should remain...
4
3159
by: Rod Gill | last post by:
Hi, I have a form that when opened in the designer appears of the screen. The form selector can't be dragged (or resized) and if I scroll right and down to centralise it the form simply jumps further away, completely leaving the selector box area. Any ideas? VS 2003 and VB.Net This is a simple application at the moment but the form is inherited from a
4
2646
by: Goran Djuranovic | last post by:
Hi all, I am experiencing a strange thing happening with a "designer.vb" page. Controls I manually declare in this page are automatically deleted after I drop another control on a ".aspx" page. - Why is this happening? - Can I disable automatic declaration and have everything be declared manually? - Any other options to fix this? Thanks in advance. Goran Djuranovic
0
8946
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9307
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9235
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8186
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
6735
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
4550
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
3261
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
2721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2180
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.