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

HtmlTextWriter output varies with browser?

OK, this one has me totally baffled. Please go to:

http://www.uiucsingles.com/

Notice the left div (class="navDiv"). For some reason the control that
renders this section of the page is outputting different tags to different
browsers, when using HtmlTextWriterAttribute and
HtmlTextWriterTag. For testing purposes, here is how the Render function
looks when the user is not logged in:

output.Write("<div class=\"navDiv\">...</div>");

and when the user IS logged in:

output.AddAttribute(HtmlTextWriterAttribute.Class, "navDiv");
output.RenderBeginTag(HtmlTextWriterTag.Div);
....
output.RenderEndTag();

In theory these should produce the same result. But for some reason, in the
non-IE browsers I tested (Firefox 1.0 and Opera 7.23), the latter case
results in a tag that looks like this:

<table class="navDiv" cellpadding="0" cellspacing="0" border="0"
width="100%"><tr><td>(stuff in the div)</td></tr></table>

It's not just with this control either. Any time I use the TextWriter
attribute/tag write methods with a div, I get the funky table in Firefox and
Opera (check out the header). But to make matters worse, IE always seems to
get the correct tag of:

<div class="navDiv">(stuff in div)</div>

Has anyone encountered anything like this before? I guess if I can't figure
out what is going on I will just manually output the proper tags. Grr...
Nov 19 '05 #1
2 1333
Jeff Evans < jwevans1@you_eye_you_see.edu > wrote:
OK, this one has me totally baffled. Please go to:
http://www.uiucsingles.com/

Sorry, forgot to mention, you can log in with this userID and password:

test_Molly
test
Thanks.
Nov 19 '05 #2
Nevermind, found the answer. In case anyone else interested:

http://aspnetresources.com/blog/adap...ing_redux.aspx

It's by design...
Nov 19 '05 #3

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

Similar topics

10
by: tram | last post by:
How do we pass on the step1 output file to step2 of the same job? I would like to know the current job's output file programmetically, instead of hard coding it. Any idaes would be appreciated. ...
2
by: Gustaf Liljegren | last post by:
I need to export an HTML file, conforming to HTML 4.01 Strict in UTF-8. I have written code for this in XmlTextWriter. Unfortunately, there seem to be no way to remove the XML declaration. The...
1
by: Tammy | last post by:
I am fairly new to asp and web development. I'm having a tough time with the htmltextwriter. I keep receiving an error that basically says 'object reference not set to instance of object. It sure...
0
by: Jon | last post by:
Hello all. I have an object of type System.Web.UI.HtmlTextWriter called output. Witin my watch or debug window, how can I get at the html that output contains? Basically, we're doing a...
3
by: Lee Chapman | last post by:
Hi, I want my ASP.NET web application to use a custom HtmlTextWriter. i.e. I want the object that the Framework passes to System.Web.UI.Control.Render() to be my own object, MyHtmlTextWriter,...
2
by: larryvan | last post by:
I have been beating my head against a wall for two days now. I need to output a hyperlink using htmltextwriter.write that looks like this: <a...
0
by: John Walker | last post by:
Hi, I have an asp.net application which binds a dataview to a datagrid, which then renders control to an HtmlTextWriter and then by doing a "response.write" my datagrid is successfully displayed...
8
by: sunny | last post by:
Hi All, When objdump command is executed It has displayed so many sections(segments) in the output ..data , .bss , .sbss , .rodata, .romdata, .COMMON, .appreset I came to know that the...
0
by: dihola | last post by:
Hi all, A component I have renders itself (essentially an HTML table) using an HtmlTextWriter object to create some HTML code. This component is part of an aspx page. I need the component to also...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
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,...

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.