473,399 Members | 3,603 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,399 software developers and data experts.

<asp:imagebutton height and width ignored in mozilla

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
Nov 17 '05 #1
1 2334
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.a...1&PostID=89874

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

"Michael Evanchik" <mi**@high-pow-er.com> wrote in message news:36*************************@posting.google.co m...
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

Nov 17 '05 #2

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

Similar topics

17
by: Fresh Air Rider | last post by:
Hello Could anyone please explain how I can pass more than one arguement/parameter value to a function using <asp:linkbutton> or is this a major shortfall of the language ? Consider the...
5
by: Fresh Air Rider | last post by:
Hello Could anyone please explain how I can pass more than one arguement/parameter value to a function using <asp:linkbutton> or is this a major shortfall of the language ? Consider the...
1
by: Dave Bennett | last post by:
I am hoping someone can help me because I am really beginning to hate IE. I am using the following code to generate a dynamic table. private void buildTable(ArrayList Products) { //Variables...
13
by: tperri | last post by:
I have an HTML table with several fields like this: <A href="Savings.aspx?category=Food"><asp:imagebutton id="imgFood" ImageUrl="images\buttons\btn-food-i.gif"...
0
by: DavidS | last post by:
I have HTML web page with <asp:Image id=img_L runat=server ImageAlign=Top Visible=True Width=y Height=x></asp:Image>. For some images, less than 128K I can view image. Other image files > 128K,...
11
by: Joe | last post by:
Hello All, I have an ASP.NET page with one Textbox (SearchTextBox) and one ImageButton (SearchButton) server controls. The user can type search text in SearchTextBox and click SearchButton and...
4
by: R.A.M. | last post by:
Hello, Could anyone help me to handle <asp:Image> click in behind code? I have: <asp:Image ID="DotNETImage" ImageUrl="Images/DotNET_360x280.jpeg" AlternateText="Microsoft .NET version 2.0"...
2
by: Mark Rae | last post by:
Hi, Has anyone found a fix for the <asp:Calendar/ CSS bug whereby certain attributes (mainly colours) are not rendered correctly? E.g. <asp:Calendar ID="calTest" runat="server"...
13
by: Smith | last post by:
Hello, Does someone know a link to an example of customization of an asp:menu? Many thansk in advance. S
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.