473,503 Members | 1,768 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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, ImageClickEventArgs 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
Nov 17 '05 #1
2 1587
Use HtmlImage instead of HtmlInputImage.
--
Regards,
Amal [MCP, MCS]
http://geocities.com/techsharing
"CodeRazor" wrote:
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, ImageClickEventArgs 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

Nov 17 '05 #2
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
Nov 17 '05 #3

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

Similar topics

0
2710
by: yurps | last post by:
Hello here is my html, if you click the missing image in the first column on the left, the div is shown, when clicked again the div disappears...but the bottom border disappears as well...Is there...
3
1068
by: ireneatngs | last post by:
Hi, I have example html below which contains a couple of hidden divs. However, some of the table borders within these hidden divs are actually displayed when they should not be. In my...
7
41717
by: Bob Bedford | last post by:
I've an image in a cell of a table. I've this CSS: ..dbtable{ width: 600px; padding: 0px 0px 0px 0px; margin: 0px 0px 0px 0px; border-collapse: collapse; border: 1px solid #000000;
23
52086
by: Bob Bedford | last post by:
I've a table. The table must not have any border. The TR (every line) must have a border, but not the lines between cells. The TR.pages must have no border. so .mytable{border:0px;} ...
2
5277
by: Jon | last post by:
Hi all, I am trying to create a page that contains a number of div elements, with links on the left side of the page allowing the user to select which div to display. Some of the pages contain...
5
2712
by: JP | last post by:
ow do I get a HtmlInputImage to raise the ServerClick event I have two inputs one is a submit button the other is a image. The submit button works the input image does not. Does anyone know why...
2
2631
by: Alex | last post by:
In my Asp.net application, I have come across a situation where I cannot prevent a postback using the HtmlInputImage control. If I use the HtmlInputButton, the post back is not automatic, however...
6
1424
by: schleichv | last post by:
Hello, I am attempting to get the ServerClick event to fire on a dynamically generated HtmlInputImage and having no luck at all. I've looked over many items on the forums but none seem to cover...
31
7150
by: jcrouse | last post by:
Is there a quick and easy way to change the color of a label controls border from the default black to white? Thank you, John
0
7199
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
7274
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
7323
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
7453
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5005
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4670
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3151
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1507
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
377
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.