<asp:imagebutton height and width ignored in mozilla

Discussion in 'ASP .Net' started by Michael Evanchik, Nov 10, 2003.

  1. The following tag works fine in internet explorer, but in mozilla the
    image is not sized and left at its actualy size. Anyone know why? I
    though asp.net works on any browswer.


    <asp:imagebutton id="Image1" Runat="server" onclick="enteraccount"
    height="90"
    width="120" ImageUrl="images/account.gif" />


    Mike
     
    Michael Evanchik, Nov 10, 2003
    #1
    1. Advertising

  2. Michael Evanchik

    Teemu Keiski Guest

    Hi,

    Mozilla isn't uplevel browser by default (ASP.NET works for all browsers but how it is configured to render for them, is very different thing). To get browser detections work bit better, you need to add something as follows to web.config (inside <system.web> tags).

    ******
    <browserCaps>

    <!--NETSCAPE 6 ja 7 //-->

    <case match="^Mozilla/5\.0 \([^)]*\) (Gecko/[-\d]+ )?Netscape[6|7]/(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*)).*">

    tagwriter=System.Web.UI.HtmlTextWriter

    browser=Netscape

    version=${version}

    majorversion=${major}

    minorversion=${minor}

    frames=true

    tables=true

    cookies=true

    javascript=true

    javaapplets=true

    ecmascriptversion=1.5

    w3cdomversion=1.0

    css1=true

    css2=true

    xml=true

    <filter match="^b" with="${letters}">

    beta=true

    </filter>

    </case>

    <!-- MOZILLA //-->

    <case match="^Mozilla/(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*))..*">


    <case match="^[5-9]\." with="${version}">

    tagwriter=System.Web.UI.HtmlTextWriter

    frames=true

    tables=true

    cookies=true

    javascript=true

    javaapplets=true

    ecmascriptversion=1.5

    w3cdomversion=1.0

    css1=true

    css2=true

    xml=true

    </case>


    </case>

    <!--

    OPERA 5+

    //-->

    <case match="Opera[ /](?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*))">

    browser=Opera

    version=${version}

    majorversion=${major}

    minorversion=${minor}

    frames=true

    tables=true

    cookies=true

    javascript=true

    ecmascriptversion=1.1

    <filter match="[4-9]" with="${major}">

    ecmascriptversion=1.3

    css1=true

    css2=true

    xml=true

    <filter match="[5-9]" with="${major}">

    tagwriter=System.Web.UI.HtmlTextWriter

    w3cdomversion=1.0

    </filter>

    </filter>



    <filter match="^b" with="${letters}">

    beta=true

    </filter>

    </case>

    </browserCaps>

    ****

    For more exact explanation see this post at ASP.NEt Forums:

    http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=89874

    --
    Teemu Keiski
    MCP, Microsoft MVP (ASP.NET), AspInsiders member
    ASP.NET Forum Moderator, AspAlliance Columnist

    "Michael Evanchik" <> wrote in message news:...
    > The following tag works fine in internet explorer, but in mozilla the
    > image is not sized and left at its actualy size. Anyone know why? I
    > though asp.net works on any browswer.
    >
    >
    > <asp:imagebutton id="Image1" Runat="server" onclick="enteraccount"
    > height="90"
    > width="120" ImageUrl="images/account.gif" />
    >
    >
    > Mike
     
    Teemu Keiski, Nov 10, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tshad
    Replies:
    1
    Views:
    418
    Mark Fitzpatrick
    Mar 3, 2005
  2. Lois
    Replies:
    1
    Views:
    3,261
    Ryan Stewart
    Dec 27, 2004
  3. Henri
    Replies:
    9
    Views:
    1,850
    Toby Inkster
    Feb 22, 2005
  4. Bernd Meier
    Replies:
    6
    Views:
    518
    GTalbot
    Jan 14, 2008
  5. lightman

    Hyperlink imageurl width/height ignored?

    lightman, Oct 6, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    197
    lightman
    Oct 6, 2003
Loading...

Share This Page