problem using client side validation and Attributes.Add
-
hi i am facing problem !!! Background : As i understand , if we use validation controls in .NET we get an autogenerated javascript to validate control. Problem : My problem is when i use control.Attributes.Add("onClick" , "alert('working')"); on some web control which has CausesValidation as true it never works !!!! and more so, i get two Onclick event call code for the same html control , when i check source of update d html (one of them being for validation control !!) , ..pushpi any answers for the problem or may be some well known workaround ! P.S. PATWAL
-
hi i am facing problem !!! Background : As i understand , if we use validation controls in .NET we get an autogenerated javascript to validate control. Problem : My problem is when i use control.Attributes.Add("onClick" , "alert('working')"); on some web control which has CausesValidation as true it never works !!!! and more so, i get two Onclick event call code for the same html control , when i check source of update d html (one of them being for validation control !!) , ..pushpi any answers for the problem or may be some well known workaround ! P.S. PATWAL
This is a bug that has been fixed in 1.1 There is no _good_ workaround, but you can look at what I do in my ConfirmedButtons controls if you absolutely need to hook the onclick event.