Home All Groups Group Topic Archive Search About

BorderWidth of the control asp:ImageButton does not work in firefox

Author
5 Oct 2007 8:44 AM
Christophe Sauvage
Hello,
Apparently the property BorderWidth of the control asp:ImageButton does not
work in firefox
there is a solution ?
Thank you.

Server code :
<%@ Page Language="C#" ContentType="text/html" ResponseEncoding="iso-8859-1"
%>
<%@ import Namespace="System" %>

<script language="C#" runat="server">

void Page_Load(Object sender, EventArgs E){
if (!IsPostBack) {
  VisuAImageButton.BorderWidth = 0;
}
}

void ChoixAClick (Object sender, ImageClickEventArgs E){
VisuAImageButton.BorderWidth = 4;
}

</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title></title>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<form class="body" runat="server" style="margin:0;">
<asp:ImageButton BorderColor="#FF0080" OnClick="ChoixAClick"
ID="VisuAImageButton" ImageUrl="/images/btn-visualisez.gif" runat="server"
/>
</form>
</body>
</html>

Author
8 Oct 2007 2:06 PM
David R. Longnecker
Christophe-

What version of FireFox are you using?  I'm unable to reproduce this with
FireFox 2.0.0.7 US.

*** Relevant Code ***

ASPX:

    <form id="form1" runat="server">
    <div>
        <asp:ImageButton id="imageTest" runat="server" ImageUrl="~/images/logo2.gif"

            onclick="imageTest_Click" />
    </div>
    </form>

Code-Behind:

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                imageTest.BorderWidth = 0;
            }
        }

        protected void imageTest_Click(object sender, ImageClickEventArgs e)
        {
            imageTest.BorderWidth = 4;
        }

-dl

--
David R. Longnecker
http://blog.tiredstudent.com

Show quote
> Hello,
> Apparently the property BorderWidth of the control asp:ImageButton
> does not
> work in firefox
> there is a solution ?
> Thank you.
> Server code :
> <%@ Page Language="C#" ContentType="text/html"
> ResponseEncoding="iso-8859-1"
> %>
> <%@ import Namespace="System" %>
> <script language="C#" runat="server">
>
> void Page_Load(Object sender, EventArgs E){
> if (!IsPostBack) {
> VisuAImageButton.BorderWidth = 0;
> }
> }
> void ChoixAClick (Object sender, ImageClickEventArgs E){
> VisuAImageButton.BorderWidth = 4;
> }
> </script>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> <meta http-equiv="Content-Type" content="text/html;
> charset=iso-8859-1" />
> <title></title>
> </head>
> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
> <form class="body" runat="server" style="margin:0;">
> <asp:ImageButton BorderColor="#FF0080" OnClick="ChoixAClick"
> ID="VisuAImageButton" ImageUrl="/images/btn-visualisez.gif"
> runat="server"
> />
> </form>
> </body>
> </html>

AddThis Social Bookmark Button