|
-
Mar 18th, 2005, 10:03 PM
#1
VS.Net & FireFox
Hi,
I am just developing an asp.net application, I usually didnt check if my application was compitable with any other browser until FireFox was released.
Anyhow I am having a lot of issues with VS.Net generated HTML in FireFox. For some wired reason VS.Net generates different HTML for different browser. Let me give you an example. I simply have a WebForm(GridLayout) and place a textbox. Now if I load this page in IE the Width attributes is specified, but when I load this page in FireFox no Width attribute is there. This is very annoying as only way i can fix this is by using CSS class, the problem with that is as I need to define different width for different text box.
Has anyone else faced similar issues? If so then what is a good way/practice so that my site will look decent in both browsers.
Thanks a lot.
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Mar 19th, 2005, 06:50 AM
#2
Member
Re: VS.Net & FireFox
hi
although i dont have much of experience in .net...but during this short period i have seen issue...and is really annoying.
the only way i found to resolve this was to design the form using tables(hidden)...its basically the old but tried method to ensure correct placement of controls.
-
Mar 19th, 2005, 06:52 AM
#3
Re: VS.Net & FireFox
 Originally Posted by yashsays
hi
although i dont have much of experience in .net...but during this short period i have seen issue...and is really annoying.
the only way i found to resolve this was to design the form using tables(hidden)...its basically the old but tried method to ensure correct placement of controls.
Yash, thanks for replying. Yes using table would probably work, but I was trying to move away from using table as layout.
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Mar 19th, 2005, 12:14 PM
#4
Re: VS.Net & FireFox
 Originally Posted by Danial
Yes using table would probably work, but I was trying to move away from using table as layout.
What would you rather use? Please don't say GridLayout and absolute positioning because I will strangle you if you do.
-
Mar 19th, 2005, 02:06 PM
#5
Re: VS.Net & FireFox
 Originally Posted by mendhak
What would you rather use? Please don't say GridLayout and absolute positioning because I will strangle you if you do.
I am using Div instead of Table for Layout purpose. Everyone seems to discourage using Table for layout now a days.
So any resolution to my problem Mr Frog, then you can strangle me as much as you want..
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Mar 19th, 2005, 02:49 PM
#6
Re: VS.Net & FireFox
Here you go:
First, don't even specify the width and height property from the IDE. Give the element a classname and define everything in your class. Or in case of a web control, that'd be the cssClass property. Make sense? So the concept of IE and FF compatibility, etc, doesn't matter much anymore.
Second, don't fall into the DIVs vs TABLEs argument. It's like what they say about arguing on the Internet: Even if you win, you're still retarded. So just do whatever you're most comfortable with.
-
Mar 22nd, 2005, 02:49 PM
#7
I wonder how many charact
Re: VS.Net & FireFox
The true issue you're having is that your browserCaps section of your machine.config file is woefully out of date.
So when a request comes in from FireFox, the .Net framework is assigning it as a down-level browser, which it in fact is not, and changing tags for certain web controls.
The browserCaps section is not maintained by Microsoft, but instead left it up to a third-party company http://www.cyscape.com/browsercaps/ to offer updates (they of course are not giving anything away and therefore have not updated the file for ages).
There are newsgroups with the modern browsercaps floating around - until you find a modern one - and one that works, you are left in the dust. Also note, the production server will also need an updated browsercaps - as any machine you test or deploy on.
-
Mar 22nd, 2005, 07:52 PM
#8
Fanatic Member
Re: VS.Net & FireFox
VS.NET is a constant source of headache when trying to make browser complient code. The arrogence of MS is really getting to me... personally I like working in .NET in almost every aspect except ASP.NET.
Edit: found a workaround
Code:
<browserCaps>
<case match="Gecko/[-\d]+">
browser=Netscape
frames=true
tables=true
cookies=true
javascript=true
javaapplets=true
ecmascriptversion=1.5
w3cdomversion=1.0
css1=true
css2=true
xml=true
tagwriter=System.Web.UI.HtmlTextWriter
<case match="rv:1.0[^\.](?'letters'\w*)">
version=6.0
majorversion=6
minorversion=0
<case match="^b" with="${letters}">
beta=true
</case>
</case>
<case match="rv:1(\.\d+)(\.\d)?(?'letters'\w*)">
version=7.0
majorversion=7
minorversion=0
<case match="^b" with="${letters}">
beta=true
</case>
</case>
</case>
</browserCaps>
Put that in your web.config file and it will look beautiful in FF... if you're feeling couragous figure out how to put it in your machine.config file... I tried and it fuxed all my asp.net projects on the server.
Last edited by Graff; Mar 22nd, 2005 at 08:24 PM.
If wishes were fishes we'd all cast nets.
-
Mar 22nd, 2005, 08:44 PM
#9
Re: VS.Net & FireFox
 Originally Posted by nemaroller
The true issue you're having is that your browserCaps section of your machine.config file is woefully out of date.
So when a request comes in from FireFox, the .Net framework is assigning it as a down-level browser, which it in fact is not, and changing tags for certain web controls.
The browserCaps section is not maintained by Microsoft, but instead left it up to a third-party company http://www.cyscape.com/browsercaps/ to offer updates (they of course are not giving anything away and therefore have not updated the file for ages).
There are newsgroups with the modern browsercaps floating around - until you find a modern one - and one that works, you are left in the dust. Also note, the production server will also need an updated browsercaps - as any machine you test or deploy on.
Nemaroller, I think you identified the problem spot on. Did some searching and found this http://slingfive.com/pages/code/browserCaps/. looks promising. I will try it on my machine and hopefully get my host to update the machine.config file.
I will let you know how it went.
Thanks a lot.
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Mar 22nd, 2005, 08:47 PM
#10
Re: VS.Net & FireFox
 Originally Posted by Graff
Put that in your web.config file and it will look beautiful in FF... if you're feeling couragous figure out how to put it in your machine.config file... I tried and it fuxed all my asp.net projects on the server.
Great didnt know you could put it on web.config, this will save me a lot of hassel and getting my host to update the machine.config.
Cheers Graff.
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Nov 7th, 2005, 01:52 AM
#11
Frenzied Member
Re: VS.Net & FireFox
I had problems rendering my ASP.NET pages in Firefox and pasting the Browsercaps tag into the Web.config has resolved a lot of the problems.
I am finding however that dropdown lists are not rendering properly - they are about 3 times the height that they should be and are covering other controls.
Has anyone experienced something like this?
-
Nov 7th, 2005, 07:16 AM
#12
Re: VS.Net & FireFox
I doubt if you'll be able to control the height of the dropdown list, because that's something that is rendered by the browser itself, not through code. Believe me, I've tried. If anyone knows how to control it, do tell.
-
Nov 7th, 2005, 05:27 PM
#13
Frenzied Member
Re: VS.Net & FireFox
So you have consistently experienced the same problem with dropdown lists in Firefox?
-
Nov 8th, 2005, 07:42 AM
#14
Re: VS.Net & FireFox
It depends on what the 'problem' is.
How about you post a snapshot.
-
Nov 8th, 2005, 07:18 PM
#15
Frenzied Member
Re: VS.Net & FireFox
This will give you some idea - one shot is MSIE and the other is the same page in Firefox.
-
Nov 9th, 2005, 08:26 AM
#16
Re: VS.Net & FireFox
LOL... that's not what I was referring to. You look like you've got some style settings in place which shouldn't be there.
Are there any style settings in your ASPX page for the drop down lists?
-
Nov 9th, 2005, 08:51 PM
#17
Frenzied Member
Re: VS.Net & FireFox
This is the declaration of a dropdown list on my page:
<asp:dropdownlist id="ddlQuantity" runat="server" Height="48px" Width="248px" style="Z-INDEX: 119; LEFT: 24px; POSITION: absolute; TOP: 504px">
<asp:ListItem Selected="True"></asp:ListItem>
<asp:ListItem Value="0">0</asp:ListItem>
<asp:ListItem Value="1">1</asp:ListItem>
<asp:ListItem Value="2">2</asp:ListItem>
<asp:ListItem Value="3">3</asp:ListItem>
<asp:ListItem Value="4">4</asp:ListItem>
</asp:dropdownlist>
Are you talking about the style attribute above?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|