473,545 Members | 1,471 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

<asp:imagebutto n 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:imagebutto n id="Image1" Runat="server" onclick="entera ccount"
height="90"
width="120" ImageUrl="image s/account.gif" />
Mike
Nov 17 '05 #1
1 2340
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'(?'m ajor'\d+)(?'min or'\.\d+)(?'let ters'\w*)).*">

tagwriter=Syste m.Web.UI.HtmlTe xtWriter

browser=Netscap e

version=${versi on}

majorversion=${ major}

minorversion=${ minor}

frames=true

tables=true

cookies=true

javascript=true

javaapplets=tru e

ecmascriptversi on=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'(?'m ajor'\d+)(?'min or'\.\d+)(?'let ters'\w*))..*">
<case match="^[5-9]\." with="${version }">

tagwriter=Syste m.Web.UI.HtmlTe xtWriter

frames=true

tables=true

cookies=true

javascript=true

javaapplets=tru e

ecmascriptversi on=1.5

w3cdomversion=1 .0

css1=true

css2=true

xml=true

</case>
</case>

<!--

OPERA 5+

//-->

<case match="Opera[ /](?'version'(?'m ajor'\d+)(?'min or'\.\d+)(?'let ters'\w*))">

browser=Opera

version=${versi on}

majorversion=${ major}

minorversion=${ minor}

frames=true

tables=true

cookies=true

javascript=true

ecmascriptversi on=1.1

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

ecmascriptversi on=1.3

css1=true

css2=true

xml=true

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

tagwriter=Syste m.Web.UI.HtmlTe xtWriter

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.goog le.com...
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:imagebutto n id="Image1" Runat="server" onclick="entera ccount"
height="90"
width="120" ImageUrl="image s/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
7341
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 following code fragments in which I want to list through all files on a directory with a link to download each file by passing a filename and whether or...
5
3740
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 following code fragments in which I want to list through all files on a directory with a link to download each file by passing a filename and whether or...
1
1297
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 int cnt = Products.Count; string key = ""; Control c; TableRow r = new TableRow();
13
7416
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" runat="server"></asp:imagebutton></A> When the user sees these buttons, they will currently be on the savings.aspx?category=whatever page, and when they click another button to...
0
1101
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, image is not viewable - comes up with X in picture box. Is there size restriction. How can I remove this - or how can I show images > 128K in web...
11
7719
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 the web server performs a database query and displays the results. All of this works fine. I want the user to be able to press the Enter key...
4
1729
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" Width="360" Height="280" runat="server" /> which I need to handle when clicked. I tried:
2
2656
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" OtherMonthDayStyle-CssClass="calOtherMonthDay" />
13
3336
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
7656
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7805
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7416
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7752
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5969
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5325
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4944
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3449
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3441
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.