w3c validation on the <asp:imagebutton> control

Hello Experts

I am trying to validate one of my .net page with W3c validator. I am almost there however
one small issue which is causing a problem and I am unable to figure out how I can set the
Image type button not to show "border=0" in an inline-style element.

I am using the below server side control and on using its onlick click event on the server
side and redirecting the user to the results page...

May be the validator things that an Input type button must not have a border attribute.

I hope someone understands what I am trying to explain here?

I would really be thankful if someone of you could please advise how I get away with
this problem? I have to use a Go button image in the background and it should be clickable to use server side onclick event.

I would not worry about it. I don't think that html generated by asp.net is meant to pass the w3c validator. The html generated by asp.net webforms is absurdly ugly and unreadable. It is not meant to look at.

As long as it works, don't validate with w3c.

If you want valid, nice and clean html, then don't use webforms.

0

dairaAuthor Commented: 2011-10-24

Hi Sybe

thanks for your advise

I have been asked to add the W3c validator logo on the homepage so I must get rid of this error somehow.

Please can you advise how I can use the simple button and use the "server_side_onclick" event to redirect the the user to the results page ...

At the moment I am using <imageButton> server contorl and using its onlick event server side I am redirecting the user as the results page does need to know the search keyword customer has supplied .... I hope you see what i mean?