Imagebutton / Image bug?

Discussion in 'ASP .Net' started by Peter, Jun 19, 2006.

  1. Peter

    Peter Guest

    Hello NG,

    Why in Asp.net 2.0 Image / Imagebutton always renders a style
    'border-width:0px' even if Borderwidth is empty ? Is there a workaround ?

    thanx
     
    Peter, Jun 19, 2006
    #1
    1. Advertising

  2. it's by default,

    did you tried to add the style as CSS to change it?

    or add:
    BorderWidth="1" BorderStyle="Solid" BorderColor="Black" to the tag


    --

    Bruno Alexandre
    (a Portuguese in Københanv, Danmark)


    "Peter" <> escreveu na mensagem
    news:...
    > Hello NG,
    >
    > Why in Asp.net 2.0 Image / Imagebutton always renders a style
    > 'border-width:0px' even if Borderwidth is empty ? Is there a workaround ?
    >
    > thanx
    >
    >
    >
    >
    >
    >
    >
     
    Bruno Alexandre, Jun 19, 2006
    #2
    1. Advertising

  3. Peter

    Peter Guest

    hi Bruno,

    problem:
    i would like to set the border-width in a css file for all controls.
    because asp.net always renders border-width as inline-style
    and overrides settings from css class it's impossible!
    no workaround to stop asp.net's behavior?





    "Bruno Alexandre" <> schrieb im Newsbeitrag
    news:%...
    > it's by default,
    >
    > did you tried to add the style as CSS to change it?
    >
    > or add:
    > BorderWidth="1" BorderStyle="Solid" BorderColor="Black" to the tag
    >
    >
    > --
    >
    > Bruno Alexandre
    > (a Portuguese in Københanv, Danmark)
    >
    >
    > "Peter" <> escreveu na mensagem
    > news:...
    >> Hello NG,
    >>
    >> Why in Asp.net 2.0 Image / Imagebutton always renders a style
    >> 'border-width:0px' even if Borderwidth is empty ? Is there a workaround ?
    >>
    >> thanx
    >>
    >>
    >>
    >>
    >>
    >>
    >>

    >
    >
     
    Peter, Jun 19, 2006
    #3
  4. if you ommited in the tag properties, css file will be the one that the tag
    uses!

    maybe you are setting the CSS wrong?


    try:

    ..border {
    border: solid 3px black;
    }

    in a CSS file, link it in the page and then add CssClass="border" to the
    asp:image tag



    --

    Bruno Alexandre
    (a Portuguese in Københanv, Danmark)


    "Peter" <> escreveu na mensagem
    news:...
    > hi Bruno,
    >
    > problem:
    > i would like to set the border-width in a css file for all controls.
    > because asp.net always renders border-width as inline-style
    > and overrides settings from css class it's impossible!
    > no workaround to stop asp.net's behavior?
    >
    >
    >
    >
    >
    > "Bruno Alexandre" <> schrieb im Newsbeitrag
    > news:%...
    >> it's by default,
    >>
    >> did you tried to add the style as CSS to change it?
    >>
    >> or add:
    >> BorderWidth="1" BorderStyle="Solid" BorderColor="Black" to the tag
    >>
    >>
    >> --
    >>
    >> Bruno Alexandre
    >> (a Portuguese in Københanv, Danmark)
    >>
    >>
    >> "Peter" <> escreveu na mensagem
    >> news:...
    >>> Hello NG,
    >>>
    >>> Why in Asp.net 2.0 Image / Imagebutton always renders a style
    >>> 'border-width:0px' even if Borderwidth is empty ? Is there a workaround
    >>> ?
    >>>
    >>> thanx
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>

    >>
    >>

    >
    >
     
    Bruno Alexandre, Jun 19, 2006
    #4
    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. ganesh kolappan

    image/imagebutton client validation

    ganesh kolappan, Jul 3, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    502
    David Waz...
    Jul 3, 2003
  2. RobertH
    Replies:
    3
    Views:
    4,820
    RobertH
    Feb 17, 2004
  3. Brian
    Replies:
    4
    Views:
    300
    Brian
    Apr 25, 2005
  4. iwasjoeking
    Replies:
    9
    Views:
    643
    dorayme
    Jun 10, 2008
  5. beanweed

    ImageButton bug

    beanweed, Jun 2, 2005, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    161
    Teemu Keiski
    Jun 4, 2005
Loading...

Share This Page