473,320 Members | 2,112 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

VisualStudio corrupts ASPX page when opened in Designer

Hello-- When I open an existing file (NoodlePage.aspx), VisualStudio
immediately changes around some lines, removes a few characters, and
switches some tags. I used fc.exe to compare the before and after;
even if I manually change each one back to the original, I get an
'Object reference not set to an instance of an object' error upon
viewing the page.

I can put back the original ASPX file and the original RESX file, and
the page works fine.

I applyied Visual Studio SP1 yesterday, but it did not fix this.

Any suggestions?

Nov 17 '06 #1
5 1522
This is probably because you have some invalid html. If Visual Studio
doesn't understand the html, I've seen it try to fix things. Try
opening the original page, viewing the page source, and make sure you
address any warnings that Visual Studio gives you.

kingflux wrote:
Hello-- When I open an existing file (NoodlePage.aspx), VisualStudio
immediately changes around some lines, removes a few characters, and
switches some tags. I used fc.exe to compare the before and after;
even if I manually change each one back to the original, I get an
'Object reference not set to an instance of an object' error upon
viewing the page.

I can put back the original ASPX file and the original RESX file, and
the page works fine.

I applyied Visual Studio SP1 yesterday, but it did not fix this.

Any suggestions?
Nov 17 '06 #2
Thank you for writing, Eric. There are no warnings in the Designer or
in the build process.

It's changing things like:

<tr height="5px" to <tr height="5">

and switched my top four lines out of order. I suspect that it is also
corrupting the associated RESX file.

Nov 17 '06 #3
It's doing it correctly because <tr height="5px"is an illegal HTML
statement, hence the translation into the other form. The only time you can
put pixel definitions for width is when you are using CSS. The following way
would be legal: <tr style="height:5px">
--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

"kingflux" <ti*@eNardoni.comwrote in message
news:11*********************@e3g2000cwe.googlegrou ps.com...
Thank you for writing, Eric. There are no warnings in the Designer or
in the build process.

It's changing things like:

<tr height="5px" to <tr height="5">

and switched my top four lines out of order. I suspect that it is also
corrupting the associated RESX file.

Nov 17 '06 #4
And yet it works fine if I never open the file in VisualStudio. ???

I'm extremely confused. I can handle the 5px --5 conversion, but why
does it corrupt the file(s) to the point where I get an error during
runtime but not during build?
Mark Fitzpatrick wrote:
It's doing it correctly because <tr height="5px"is an illegal HTML
statement, hence the translation into the other form. The only time you can
put pixel definitions for width is when you are using CSS. The following way
would be legal: <tr style="height:5px">

Nov 21 '06 #5
Finally figured this out on my own. VisualStudio was adding
declarations to the code behind this ASPX page (NoodlePage.aspx.vb) and
not telling me!

The declarations exist correctly in the base/inherited page
(NoodleBase.vb), so these new declarations were conflicting. I can
delete the inserted declarations, save the file, and debug without the
fatal error.
(Microsoft products are helpful -- until you really need them to be.)

kingflux wrote:
And yet it works fine if I never open the file in VisualStudio. ???

I'm extremely confused. I can handle the 5px --5 conversion, but why
does it corrupt the file(s) to the point where I get an error during
runtime but not during build?
Mark Fitzpatrick wrote:
It's doing it correctly because <tr height="5px"is an illegal HTML
statement, hence the translation into the other form. The only time you can
put pixel definitions for width is when you are using CSS. The following way
would be legal: <tr style="height:5px">
Dec 1 '06 #6

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

Similar topics

0
by: L Scott | last post by:
I've created a page ancestry (framework) for our application so that all pages in our app would have the same look and feel. To do this, I created several user controls (header, footer, menu,...
0
by: ES | last post by:
Hello, I'm using VS 2003 for an ASP.NET project. I have a number of web forms, components, user controls, etc in the project. It compiles and runs correctly. One form when opened in the...
3
by: Rik Moed | last post by:
Hi, I am having a problem with Excel 2003 worksheets when I upload them using the HtmlIputFile. After the upload, I start to download the worksheet and it appears to be currupt. I recieve the...
2
by: mharness | last post by:
Hello, I've tried a number of examples showing how to read the properties of a user control from an aspx file where the code is on the html view of the form but I can't figure out how to read...
1
by: maya | last post by:
when I try to open .aspx files in VS 2003, I get this alert: The file could not be opened into the Web Forms designer Please correct the following error and then try loading it again: An...
13
by: Bob Jones | last post by:
Here is my situation: I have an aspx file stored in a resource file. All of the C# code is written inline via <script runat="server"tags. Let's call this page B. I also have page A that contains...
0
by: dvestal | last post by:
I have a large form, with several hundred controls. When I open it in the designer, the designer resizes the form, but does not adjust the size of anchored controls in containers, thus corrupting...
3
by: =?Utf-8?B?cGlja2VkYW5hbWU=?= | last post by:
I am so frustrated, as is USUAL using Visual Studio. NONE, NOOOOONE of my aspx files have associated designer.vb files available (And yes, they all have the .vb code behind files). All of my aspx...
2
by: AAaron123 | last post by:
Useing vs2008 I created a new web site. I opened .aspx file to get the tab titled Default.aspx, which has the views: Source, Split and Design I draged a couple of components on to the .aspx...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.