HtmlInputImage.Border

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • CodeRazor

    HtmlInputImage.Border

    I am building my html page in .net. After i click a button, i want an
    outline/border to appear around my button. I have found the
    HtmlInputImage. Border property and although it prints out (border="5") in the
    html when i view source, it fails to show anything in the browser. What am I
    failing to do here?

    My code behind:
    private void ImageBtn_Click( Object sender, ImageClickEvent Args e)
    {
    HtmlInputImage image = (HtmlInputImage )sender;
    image.Border = 5; //Fails to show border in the browser
    image.Alt = "hello"; //Works fine
    }

    My html output:
    <input src="C:\myImage .gif" name="_ctl7" type="image" alt="hello" border="5"
    />

    Many thanks
  • AMALORPAVANATHAN YAGULASAMY(AMAL)MCP,MCS

    #2
    RE: HtmlInputImage. Border

    Use HtmlImage instead of HtmlInputImage.
    --
    Regards,
    Amal [MCP, MCS]
    Latest news coverage, email, free stock quotes, live scores and video are just the beginning. Discover more every day at Yahoo!



    "CodeRazor" wrote:
    [color=blue]
    > I am building my html page in .net. After i click a button, i want an
    > outline/border to appear around my button. I have found the
    > HtmlInputImage. Border property and although it prints out (border="5") in the
    > html when i view source, it fails to show anything in the browser. What am I
    > failing to do here?
    >
    > My code behind:
    > private void ImageBtn_Click( Object sender, ImageClickEvent Args e)
    > {
    > HtmlInputImage image = (HtmlInputImage )sender;
    > image.Border = 5; //Fails to show border in the browser
    > image.Alt = "hello"; //Works fine
    > }
    >
    > My html output:
    > <input src="C:\myImage .gif" name="_ctl7" type="image" alt="hello" border="5"
    > />
    >
    > Many thanks[/color]

    Comment

    • CodeRazor

      #3
      HtmlInputImage and HtmlImage difference?

      thank you! That resolves another complication i was having too, namely that
      the HtmlInputImage has no "width" or "height" property.

      What's the difference then between HtmlImage and HtmlInputImage?
      I Didnt realise both existed. thank you!

      CR


      Comment

      Working...