-
[2005] .NET 2.0 and FireFox
How have you guys been handling writing ASP.NET code (specifically 2.0) for cross browser compatibility?
I know there were all sorts of issues with .NET 1.1 and its default grid layout which MS has reverted back to default flow layout for 2.0.
Do .NET 2.0 controls still render HTML 3.2 to non IE browsers?
I have a bit of webconfig magic I found around the web a while back for forcing HTML 4.0 out regardless of IE or FireFox, which I used to ease the pain a bit in 1 or 2 of the ASP.NET 1.1 apps I have written, but I find this rather odd, as I would think you should not have to do this...
In any event, how have you guys been making out writing web applications to work on multiple browsers?
It would seem that ASP.NET really only cares about you using IE, and makes it rather frustrating to get things looking the same in each browser. (which is why I prefer windows programming over web programming :sick: )
-
Re: [2005] .NET 2.0 and FireFox
Actually I've just developed part of our home Intranet and it works better in Firefox than in IE7. Odd :ehh:
Having just flow layout will make things much better now too :thumb:
-
Re: [2005] .NET 2.0 and FireFox
Do you use the browsercaps functionality to force ASP.NET to render controls in HTML 4? or do you just let IE see it as a downlevel browser and give HTML 3.2 code?
-
Re: [2005] .NET 2.0 and FireFox
Don't use browsercaps, just as is.
Although I've used a great deal of CSS so that might explain why it's better in Fx as I understand Fx is more CSS compliant?
It's just little things anyway like text centering and such, nothing too drastic.
-
1 Attachment(s)
Re: [2005] .NET 2.0 and FireFox
Here is a small example...
You can probably guess which one is FireFox....
I believe this is due to the difference in handling of SPAN tags between the 2 browsers...
-
Re: [2005] .NET 2.0 and FireFox
Possibly.
Don't tell me, Fx is the bottom one?? ;)
-
Re: [2005] .NET 2.0 and FireFox
Might sound crude, but the problem is probably you. I've been working with 1.1 and 2.0 for quite some time now, and even with UI-complex applications, no problems. It's probably about the technique you're using to render them.
For example, in the case above I'd use a <table> or a <div> bunch to set them in their places. Why did you even use a <span>?
-
Re: [2005] .NET 2.0 and FireFox
mend, I don't use a span.. when I use VS to layout the webform, it creates spans automatically for much of the formatting, specifically text that I have.
For example.. I type some text, then make it bold, VS makes it a span...
I don't take offense to what you are saying, I know you mean that its all about coding it right in the first place, which is what I am after, however it seems near impossible to use the WYSIWYG editor in VS without it generating HTML that firefox will barf on...
Do you do most of your coding in HTML view?
-
Re: [2005] .NET 2.0 and FireFox
A lot of it yes but I have yet to come across it using Spans, it mostily uses divs
Perhaps there is a setting in VS that you have changed which is using Spans instead?
-
Re: [2005] .NET 2.0 and FireFox
What I did, and what I recommend, is that you make every effort to prevent any stylistic HTML code from being produced, and that what is produced is valid standards compliant. The built in controls (that I used, anyway) have options for this.
Then, style the whole thing using CSS.
Everything I have done in ASP.NET, with the exception of some Javascript in a third party control, has looked very similar in both browsers.
And yes, I do all the coding in HTML view. Don't touch the WSIWYG editor, it was designed for one purpose only and that is to output code that will render correctly in Internet Explorer 6. Hell, sometimes it even looks bad in IE 7.
-
Re: [2005] .NET 2.0 and FireFox
The WYSIWYG editor was made for n00bs. No, really.
VS 2005 has a great HTML intellisense, you can use that and things will be better than they were before. It even does XHTML validation and tells you where you're doing something bad.
-
Re: [2005] .NET 2.0 and FireFox
I know the 2003 WYSIWYG editor was useless, but I thought they had cleaned that up in 2005 to produce only valid W3C HTML Code..
however I guess I am wrong about that..
-
Re: [2005] .NET 2.0 and FireFox
hi, how did you fixed the cross browser compatibility?
tnx
-
Re: [2005] .NET 2.0 and FireFox
pit, what kind of problem are you having exactly?
-
Re: [2005] .NET 2.0 and FireFox
Think he's talking about browsercaps...?
-
Re: [2005] .NET 2.0 and FireFox
Quote:
Originally Posted by kleinma
How have you guys been handling writing ASP.NET code (specifically 2.0) for cross browser compatibility?
I know there were all sorts of issues with .NET 1.1 and its default grid layout which MS has reverted back to default flow layout for 2.0.
Do .NET 2.0 controls still render HTML 3.2 to non IE browsers?
I have a bit of webconfig magic I found around the web a while back for forcing HTML 4.0 out regardless of IE or FireFox, which I used to ease the pain a bit in 1 or 2 of the ASP.NET 1.1 apps I have written, but I find this rather odd, as I would think you should not have to do this...
In any event, how have you guys been making out writing web applications to work on multiple browsers?
It would seem that ASP.NET really only cares about you using IE, and makes it rather frustrating to get things looking the same in each browser. (which is why I prefer windows programming over web programming :sick: )
.NET works better in Fx than it does in IE... reason? Standards-compliance. IE violates so many standards it hurts. Yes, cool stuff can be done in IE that can't be done in any other browser, but is it worth violating the law of the land for? I use tables, spans, and spacer images religiously, and all of my pages work identically across all browsers. I don't specify width tags for table cells, spans, OR divs. I create an extra row and column filled with transparent 1x1px .gif images stretched to the right size. No browser can read that wrong.
Thus far, it's the only method I've found that's guaranteed to work cross-browser.
-
Re: [2005] .NET 2.0 and FireFox
I just want to note, this is somewhat of an old post that was brought back up today by pit bait
my specific issue was resolved a while back (either using browser caps or I changed something in the HTML, I can't remember)
-
Re: [2005] .NET 2.0 and FireFox
Please mark you thread resolved using the Thread Tools above
-
Re: [2005] .NET 2.0 and FireFox
I read this thread is resolved but here's my 2 cents worth.
XHTML & CSS - "the first real html standard" - is able to render properly in all 6+ browsers and most 5+ with some fixes. If you view most web logs or stats you'll see 90 - 99% of all browsers these days are 6+
The morel - SET the validation in VS to XHTML 1.0 or higher and write HTML in source view.
-
Re: [2005] .NET 2.0 and FireFox
"asp.net 2.0/vb 2005"
ive tried the w3c markup validation service and the error says
there is no attribute "valign". - 8750" alt="Expand Department" valign="middle" /></td>
how can i correct this error, i think my menu control bar is the problem. I've tried to look for the source code but i don't see any code same as the error says.
t.y.
-
Re: [2005] .NET 2.0 and FireFox
Some of the ASP.NET controls tend to output 'non-standard' HTML in the sense that it won't validate. For your valign, you'd use CSS instead. If it's an ASP.NET control that you're referring to (menu control bar) then have a look at CSS Adapters in ASP.NET, which allow you to control the way that the control is rendered.
-
Re: [2005] .NET 2.0 and FireFox
Quote:
Originally Posted by timeshifter
I create an extra row and column filled with transparent 1x1px .gif images stretched to the right size. No browser can read that wrong.
I didn't think anyone had done that since the 90s. http://www.vbforums.com/
-
Re: [2005] .NET 2.0 and FireFox
Quote:
Originally Posted by pit_bait
"asp.net 2.0/vb 2005"
ive tried the w3c markup validation service and the error says
there is no attribute "valign". - 8750" alt="Expand Department" valign="middle" /></td>
how can i correct this error, i think my menu control bar is the problem. I've tried to look for the source code but i don't see any code same as the error says.
t.y.
prob wrong forum, but to resolve the issue
Code:
alt="Expand Department" style="vertical-align:middle;" /></td>
for the rest of the thread. I find the VS WYSIWYG editor to be useless. and i dont mean to start visual studio bashing at all, but myself personally only use visual studio for the .NET intellisense. 80% of the features that arent in other, more light-weight editors (such as ultra-edit) go unused by me.
I write all my own HTML, and style it accordingly. Just my way of doing it.
Cheers
-
Re: [2005] .NET 2.0 and FireFox
Handcoding is the way to go! It's like self love! :afrog: