Remove inline styles from asp controls

Discussion in 'ASP .Net Web Controls' started by hardieca@hotmail.com, Dec 20, 2006.

  1. Guest

    Hi,

    I'm adding an asp:Image control to a page, but I'm having a hard time
    removing an inline style from the emitted HTML. My control:

    <asp:Image ImageUrl="myPic.jpg" alt="My Pic" />

    comes out as

    <img src="myPic.jpg" alt="My Pic" style="border-width:0px" />

    The inline style has a greater specificity than a border style I've
    applied to images in my stylesheet, which is impacting how I want my
    page displayed. How do I remove it?

    I am using ASP.NET v. 2, and I want this control to emit exactly the
    following:

    <img src="myPic.jpg" alt="My Pic" />

    I do not want to edit the inline style, I want it struck out. Is this
    possible?

    Regards,

    Chris
    , Dec 20, 2006
    #1
    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. cmonsta
    Replies:
    1
    Views:
    588
    Patrick Olurotimi Ige
    Mar 8, 2005
  2. shank

    inline hyperlink styles

    shank, Dec 18, 2003, in forum: HTML
    Replies:
    1
    Views:
    3,220
    Sid Ismail
    Dec 18, 2003
  3. John Salerno

    overriding inline styles?

    John Salerno, Jan 31, 2006, in forum: HTML
    Replies:
    12
    Views:
    767
    John Salerno
    Feb 1, 2006
  4. Replies:
    9
    Views:
    4,203
    J.O. Aho
    Feb 13, 2007
  5. Replies:
    0
    Views:
    80
Loading...

Share This Page