ASP.Net validator controls are all or nothing. ASP.Net 2.0 solves this
problem. In the interim there are a number of 3rd party components, such
as:
http://www.peterblum.com/vam/home.aspx
That's just one I found by searching, I don't think it's free, but you
should be able to find one. Search for grouped validator controls or
something similar.
Karl
"Jerrad" <je*****@oslc.org> wrote in message
news:2f****************************@phx.gbl...
I have a textbox and a button within a repeater. The
OnItemCommand sub of the repeater looks like this:
Sub RepeaterButtonSub(ByVal source As Object, ByVal e
As RepeaterCommandEventArgs)
Dim RejectTxt As TextBox =
CType(e.Item.FindControl("txtRejectNote"), TextBox)
RejectButton(New
Guid(e.CommandArgument.ToString), RejectTxt.Text)
End Sub
Note that even though the textbox within each repeateritem
are named the same ("txtRejectNote"), the sub gets the
correct one, I assume because FindControl is limited to
searching for controls within the specific repeateritem.
Now I want to add a RequiredFieldValidator for the textbox.
I set the ControlToValidate to "txtRejectNote", but
instead of validating just the textbox within the
repeateritem in which I clicked the button, it validates
all the textboxes in all the repeateritems (since they all
have the same ID). Is this a bug? Is there any way to
make it validate only the textbox that's in the same
repeateritem as the button? Thanks.