views:

37

answers:

2

How to remove the clickabilty of an image?

as you may see, there is no arroung the image...

the code of img:

<input name="ui_taskFormControl$ctl03$ctl00$ctl03$ui_BirthPlaceImage" height="20" id="ui_taskFormControl_ctl03_ctl00_ctl03_ui_BirthPlaceImage" type="image" src="SmartPenHandler.ashx?FormId=XYZ&FieldId=BirthPlace" complete="complete"/>

alt text

+3  A: 

An <input> of type image is a form of form submit button. If you want an image that isn't clickable just use the good old fashioned <img> tag. There are probably other ways if you want it to stay as an <input> but using <img> will be your easiest solution.

Chris
private HtmlInputImage ui_BirthPlaceImage; The input is initialized like that above. How can I achieve in this style of work?
blgnklc
blgnklc
@blgnklc: Do you need it to be an <input> that is disabled rather than an <img> then? If an Image is fine the object you want is an HtmlImage.
Chris
I have found my answer: ui_SmartPenFieldImage.Disabled = true;thanks sir!
blgnklc
A: 
 ui_BirthPlaceImage.Disabled = true;
blgnklc