Groups | Blog | Home
all groups > asp.net > february 2006 >

asp.net : IE's view source not showing what is actually being displayed


jwwishart NO[at]SPAM gmail.com
2/9/2006 9:24:20 PM
For some reason I'll view an aspx page and...

1. Scripts that I add (using the RegisterStartupScript method of the
Page object) dont show up in the source(IE->View Source)even thought I
know that the scripts are registering fine in every other page.
2. I can see (for example) a div tag with many controls and text
contained in it, yet the source (viewed in IE) doesn't even have a
trace of these elements. It appears as if ALL of the elements are not
in the source code yet IE renders the controls.

I would apprecate anyone's help on this issue as it makes absolutely no
sense!
KMA
2/10/2006 12:00:00 AM
Most bizarre.

Can you save the source as a file on the HD then open it with IE, or even
Firefox or another browser. See if the elements are still there. I assume
it's not something like the elements are tabbed to the right of the source
and you have to horizontal scroll to see them in the source.



[quoted text, click to view]

Kevin Spencer
2/10/2006 6:39:59 AM
Did you do a search for "<script" ?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
We got a sick zebra a hat,
you ultimate tuna.


[quoted text, click to view]

jwwishart NO[at]SPAM gmail.com
2/12/2006 2:16:03 PM
Your assumptions are correct regarding horizontal scrolling.

Despite it not helping me understand why this is happening it was an
interesting test so thankyou..I Ran the page and opened a sort of
dialog (floating Div tag) and saved the page. The elements that were on
the page(the div tag and its containing elements) didn't show on the
saved page!

Any Idea's as to why this may be happening???
jwwishart NO[at]SPAM gmail.com
2/12/2006 2:22:01 PM
Yes i have looked for script tags, a variety of strings that are
visible on the page as well as ID's for elemtent that are visible. It
turns out that I've been searching in vain!
KMA
2/13/2006 12:00:00 AM
Just a stab in the dark...

... but does your page use frames? You might be viewing a whole rendered page
but viewing the source of only one (empty?) frame.


[quoted text, click to view]

jwwishart NO[at]SPAM gmail.com
2/13/2006 8:23:14 PM
No frames.

I'm fairly fluent in HTML... Basically what I see is whole sections (ie
div tags and their contents ie datagrids drop down lists etc)
disappearing.
Not a trace of the contents (ie label text, data that has been rendered
by DataGrid controls, id's of controls) and also scripts that dont
appear. I know that the scripts seem to not render when there are
scripting errors on the page. If i run a page that has scripting errors
on it the scripts that i've inserted will not be anywere to be seen
(the script or their effects)
AddThis Social Bookmark Button