473,398 Members | 2,088 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,398 software developers and data experts.

asp.net: Correct Size for imagebutton under Firefox

I have a web page with a Imagebutton that needs to be 1" square. I
created the button and set the width to "112px" and this works well
under IE 6x. However when I run the page under Firefox, the button is
very large, It appears that the server is NOT sending any the
style="width:112px;" portion of the HTML. Is there a way to force
asp.net to send this information for this control?

Thanks

Code for IE:

<input type="image" name="Startpage_controlV21:Imagebutton1"
id="Startpage_controlV21_Imagebutton1" title="" src="Pin - 1 inch
square.jpg" border="0" style="width:112px;" />
Code for FF:

<input type="image" name="Startpage_controlV21:Imagebutton1"
id="Startpage_controlV21_Imagebutton1" title=""" src="Pin - 1 inch
square.jpg" border="0" />
Nov 19 '05 #1
2 2999
David wrote:
I have a web page with a Imagebutton that needs to be 1" square. I
created the button and set the width to "112px" and this works well
under IE 6x. However when I run the page under Firefox, the button is
very large, It appears that the server is NOT sending any the
style="width:112px;" portion of the HTML. Is there a way to force
asp.net to send this information for this control?

Thanks

Code for IE:

<input type="image" name="Startpage_controlV21:Imagebutton1"
id="Startpage_controlV21_Imagebutton1" title="" src="Pin - 1 inch
square.jpg" border="0" style="width:112px;" />
Code for FF:

<input type="image" name="Startpage_controlV21:Imagebutton1"
id="Startpage_controlV21_Imagebutton1" title=""" src="Pin - 1 inch
square.jpg" border="0" />

add 'Page.ClientTarget="ie5";' in the "Page_Load" event.

For the non-IE browser, Dotnet just will consider they are old browser
and cannot support new version HTML function ,e.g. inline style.
Although, FireFox can support inline style actually.
'Page.ClientTarget="ie5";' forces the Dotent outputs IE5 support HTML.
However, you need to check all other output carefully for any possible
non-compatible output.
--
Jacky Kwok
jacky@alumni_DOT_cuhk_DOT_edu_DOT_hk
jacky@compose_DOT_com_DOT_hk
Nov 19 '05 #2
You should also check BrowserCaps in web server to be sure that Firefox is
correctly detected.
http://slingfive.com/pages/code/browserCaps/

Solved my style problems with Firefox.


"Jacky Kwok" wrote:
David wrote:
I have a web page with a Imagebutton that needs to be 1" square. I
created the button and set the width to "112px" and this works well
under IE 6x. However when I run the page under Firefox, the button is
very large, It appears that the server is NOT sending any the
style="width:112px;" portion of the HTML. Is there a way to force
asp.net to send this information for this control?

Thanks

Code for IE:

<input type="image" name="Startpage_controlV21:Imagebutton1"
id="Startpage_controlV21_Imagebutton1" title="" src="Pin - 1 inch
square.jpg" border="0" style="width:112px;" />
Code for FF:

<input type="image" name="Startpage_controlV21:Imagebutton1"
id="Startpage_controlV21_Imagebutton1" title=""" src="Pin - 1 inch
square.jpg" border="0" />

add 'Page.ClientTarget="ie5";' in the "Page_Load" event.

For the non-IE browser, Dotnet just will consider they are old browser
and cannot support new version HTML function ,e.g. inline style.
Although, FireFox can support inline style actually.
'Page.ClientTarget="ie5";' forces the Dotent outputs IE5 support HTML.
However, you need to check all other output carefully for any possible
non-compatible output.
--
Jacky Kwok
jacky@alumni_DOT_cuhk_DOT_edu_DOT_hk
jacky@compose_DOT_com_DOT_hk

Nov 19 '05 #3

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

Similar topics

4
by: George K | last post by:
Hi, i have a very irriting problem that i have written a short piece of code to demonstrate. The problem is that my aspx page is not fully refreshed after an event, which is delegated to an...
0
by: Michelle Keys | last post by:
I am trying to call a print function to print a string from a database using javascript. Which is RC_DATA of Varchar2(2500). This is a javascript is not being used. I have a thing that needs to...
2
by: Shapper | last post by:
Hello, I have an ASP:Image and an ASP:ImageButton where I set Width=100. Asp:ImageButton is resized in Internet Explorer but not in Firefox. Asp:Image is resized both in Internet Explorer...
2
by: Robert Smith jr. | last post by:
Hello, Please pardon my newbie question ... I am building an ASP.NET page that displays a recordset with a Delete statement enabled (this all works fine). I want to Insert the current row...
8
by: Radx | last post by:
Here in my web application, I have a data entry page with serval controls. Some of the controls have autopostback is set true. But the problem is when two or more people are entering data at the...
1
by: RicercatoreSbadato | last post by:
i need help, i have an ImageButton inside the ItemTemplate tag of a Repeater. In the code behind i use a DataBound() to assign a CommandName and a CommandArgument to the ImageButton. If i use...
3
by: rockdale | last post by:
Hi, all: My web application using MS EntLib for .net 2.0 (Jan 2006) to access my backend database. It works fine with MS SQL 2k. Now we are migrate from MS SQL to mySQL. Everything looks fine...
2
by: sirdavethebrave | last post by:
Hi guys - I have written a form, and a stored procedure to update the said form. It really is as simple as that. A user can go into the form, update some fields and hit the update button to...
3
by: premprakashbhati | last post by:
hi, good evening.. i am going to upload an image in a web form .....for that iam using HTML input(file) control and one web control button i.e., Upload_Button() here is the code ...its work fine...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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,...
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
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,...

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.