Problem setting focus to validationsummary control after validation

Posted by Ed on Stack Overflow See other posts from Stack Overflow or by Ed
Published on 2009-10-28T04:34:07Z Indexed on 2010/12/25 16:54 UTC
Read the original article Hit count: 273

Filed under:
|
|

Hi,

I have a validationsummary control which displays the summary of a few validationrequired controls and all of them belong to a validationgroup.

My submit button also has the same validationgroup so it validates everything upon it being clicked.

The problem i am having is setting the focus to the validationsummary control after validation occurs when my submit button is clicked. The focus goes to the top of my webform.

I need the focus to be put at the validationsummary control. How do i achieve this?

FYI:SetFocusOnError="true" did not work.

Thanks for reading.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about JavaScript