Array
(
)

TextBox com validador de borda vermelha - problema com FOCUS

Fernandospaiva
   - 30 jul 2007

Por que o SetFocusOnError não funciona com o segundo validador?

<asp:textbox ID=´txtFocusOK´ runat=´server´ ValidationGroup=´FocusOK´ />
<asp:RequiredFieldValidator ID=´valFocusOK´ runat=´server´ ValidationGroup=´FocusOK´ ControlToValidate=´txtFocusOK´ SetFocusOnError=´true´ />

<asp:Button ID=´btnFocusOK´ runat=´server´ ValidationGroup=´FocusOK´ Text=´Focus OK´ />

<asp:RequiredFieldValidator ID=´valFocusNotOK´ runat=´server´ ValidationGroup=´FocusNotOK´ ControlToValidate=´txtFocusNotOK´ SetFocusOnError=´true´ style=´border: 1px solid red´>
<asp:textbox ID=´txtFocusNotOK´ runat=´server´ ValidationGroup=´FocusNotOK´ style=´visibility: visible´ />
</asp:RequiredFieldValidator>

<asp:Button ID=´btnFocusNotOK´ runat=´server´ ValidationGroup=´FocusNotOK´ Text=´Focus Not OK´ />