473,405 Members | 2,445 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,405 software developers and data experts.

Problem with Tag Rendering in ASP.NET

Hi,

I am facing a strange problem!

I have hosted the same ASP.NET web app in two servers.
One server is Win XP Pro (IIS 5.1) and the other is Win 2k Server (IIS
5).

The trouble is when the application is requested from the WinXP
machine, it renders SPAN tag, while when the page is requested from
the Win2k machine it does not!

To explain it in more detail:

From Win2k server:
<input id="dgrTeamAuth__ctl2_chkAuthorized" type="checkbox"
name="dgrTeamAuth:_ctl2:chkAuthorized" checked="checked"
onclick="javascript:SyncTextBox(this);" />

From WinXP server:
<span onclick="javascript:SyncTextBox(this);"><input
id="dgrTeamAuth__ctl2_chkAuthorized" type="checkbox"
name="dgrTeamAuth:_ctl2:chkAuthorized" checked="checked" /></span>
Now the diference is in SPAN tag.

Due to this some JavaScript of the page is throwing error.

How can I ensure that the browser renders the same HTML each time,
atleast if the client PC remains the same?

Please help.
-Surajit Laha
Nov 18 '05 #1
2 876
"Surajit Laha" <s_****@rediffmail.com> wrote in message
news:ba**************************@posting.google.c om...
Hi,

I am facing a strange problem!

I have hosted the same ASP.NET web app in two servers.
One server is Win XP Pro (IIS 5.1) and the other is Win 2k Server (IIS
5).

The trouble is when the application is requested from the WinXP
machine, it renders SPAN tag, while when the page is requested from
the Win2k machine it does not!

To explain it in more detail:

From Win2k server:
<input id="dgrTeamAuth__ctl2_chkAuthorized" type="checkbox"
name="dgrTeamAuth:_ctl2:chkAuthorized" checked="checked"
onclick="javascript:SyncTextBox(this);" />

From WinXP server:
<span onclick="javascript:SyncTextBox(this);"><input
id="dgrTeamAuth__ctl2_chkAuthorized" type="checkbox"
name="dgrTeamAuth:_ctl2:chkAuthorized" checked="checked" /></span>
Now the diference is in SPAN tag.

Due to this some JavaScript of the page is throwing error.

How can I ensure that the browser renders the same HTML each time,
atleast if the client PC remains the same?


Surajit,

First of all, you should not expect to have so much control over the
rendered HTML unless you are the one generating the HTML. Surely Microsoft
should be free to change the details of the HTML they render from time to
time?

Secondly, I believe that this is exactly your problem - you are running two
different versions of the .NET Framework. Perhaps one machine is running 1.0
and the other machine is running 1.1.

As to a workaround, your JavaScript will have to adapt to the situation. If
it needs to manipulate the <input> element, it will have to search for it.
If "this" is the input element, it need not search. But if not, it should
search in the children of "this".
--
John Saunders
johnwsaundersiii at hotmail
Nov 18 '05 #2
Hi John,

Thanks a LOT for your to-the-point comments!!!

You are absolutely right.

I am now modifying my JavaScript code to take care of this situation.

Thanks again.

Regards,

-Surajit Laha
Nov 18 '05 #3

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

Similar topics

6
by: David Opstad | last post by:
I have a question about text rendering I'm hoping someone here can answer. Is there a way of doing linguistically correct rendering of Unicode strings in Python? In simple cases like Latin or...
29
by: Joseph Haig | last post by:
I am trying to use descriptive lists, <DL>, as shown in <http://www.maths.man.ac.uk/~jhaig/tmp/test.html> with a style sheet at <http://www.maths.man.ac.uk/~jhaig/tmp/default-2.css>. With Mozilla...
6
by: B McDonald | last post by:
Hi. I am trying to straighten out some DIV issues in the rendering of my no-tables CSS website. Right now the biggest issue is trying to render 2 columns several DIVs deep in the box model for my...
16
by: Michael Bernstein | last post by:
Hello, I've tried to solve this problem six ways from sunday, but I'm conceding defeat and asking for help at this point. The following site is rendering *very* oddly in Mozilla only. IE seems...
0
by: haust | last post by:
Hi, for my D3D C# editor i'm using a simple panel control as the target window for rendering (the Paint method is overriden). I have a problem when it come to smoothly updating the view. I'm...
5
by: Luis Fajardo | last post by:
I'm expiriencing a basic HTML appearance problem with ASP.NET. Following a couple of sample tags to ilustrate my problem: <asp:TextBox id="txtWidthIssue" runat="server"...
4
by: Richard | last post by:
Hi, I like a demo on layers posted at http://www.echoecho.com/csslayers.htm. It displays two text phrases in separate layers visually overlapped, first with one on top and the other beneath,...
0
by: Rams | last post by:
hi iam writting application where rendering point by point on inkpicture captured by newpackets event in another application. i have two problems here. if i use inkpicture.creategraphics () ink is...
0
by: Juan R. | last post by:
Since the idea of encoding mathematics using MathML is being very far from popular due to a number of factors -expensive tools, bad accesibility of generated code, unusual verbosity, lack of...
12
by: Vadim Guchenko | last post by:
Hello. I'm using the following code: <html> <head> <style type="text/css"> pre {display: inline;} </style> </head>
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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...
0
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...

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.