Wednesday 22 August 2007

Accessibility with .Net

Using html label elements in conjunction with .Net server side controls doesn't provide the accessibilities features you might like straight out the box.

The reason being that server side controls generate different ids on the client side based on their naming containers.

So, when setting the 'for' attribute of a label, you need to specify the ClientID of the server side control you are targeting.

We do this by using <% ... %> tags

I can't place the code here cause this WYSIWYG editor doesn't let me paste code...unless i haven't found the function yet!

No comments:

Post a Comment