Results 1 to 17 of 17

Thread: VS.Net & FireFox

  1. #1

    Thread Starter
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877

    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 :

  2. #2
    Member
    Join Date
    Oct 2004
    Location
    India
    Posts
    53

    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.
    Yash

  3. #3

    Thread Starter
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877

    Re: VS.Net & FireFox

    Quote 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 :

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: VS.Net & FireFox

    Quote 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.

  5. #5

    Thread Starter
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877

    Re: VS.Net & FireFox

    Quote 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 :

  6. #6
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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.

  7. #7
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704

    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.

  8. #8
    Fanatic Member Graff's Avatar
    Join Date
    Jan 2002
    Location
    Calgary
    Posts
    668

    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.

  9. #9

    Thread Starter
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877

    Re: VS.Net & FireFox

    Quote 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 :

  10. #10

    Thread Starter
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877

    Re: VS.Net & FireFox

    Quote 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 :

  11. #11
    Frenzied Member
    Join Date
    Jan 2001
    Posts
    1,374

    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?

  12. #12
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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.

  13. #13
    Frenzied Member
    Join Date
    Jan 2001
    Posts
    1,374

    Re: VS.Net & FireFox

    So you have consistently experienced the same problem with dropdown lists in Firefox?

  14. #14
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: VS.Net & FireFox

    It depends on what the 'problem' is.

    How about you post a snapshot.

  15. #15
    Frenzied Member
    Join Date
    Jan 2001
    Posts
    1,374

    Re: VS.Net & FireFox

    This will give you some idea - one shot is MSIE and the other is the same page in Firefox.
    Attached Images Attached Images   

  16. #16
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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?

  17. #17
    Frenzied Member
    Join Date
    Jan 2001
    Posts
    1,374

    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
  •  



Click Here to Expand Forum to Full Width