4 Jan 2006

Back in the old days we used to be able to put as many forms as we liked on a page. One cool thing about that was they could be set to action on different pages, and the appropriate submit buttons would fire when Enter was pressed.

Now ASP.NET only really allows us to use one form (without nasty hacks) on a page, we have the problem that any submit button is potentially the target of the Enter key.

Well, I just found out that the Panel object in ASP.NET 2.0 has a DefaultButton property which applies to all the child inputs of the Panel. Lordy loo.

There is a drawback however - it requires Javascript to work (like so many other ASP.NET controls). I'm no JavaScript hater but bear in mind that WCAG 1.0 Level A requires a site to work without Client Script. Nothing's ever easy is it?