Last post Jan 18, 2010 05:57 PM by jkirkerx
Jan 16, 2010 04:17 PM|talsja|LINK
I have build a composite control containing a Label, TextBox and a ImageButton. The idea:
Label text | textbox | imagebutton used for triggering an event
This textbox has a build-in validation.
When the imagebutton is set, i will use this imagebutton as a trigger. This imagebutton has an onclick event. Nou my problem is the following:
When i have my textbox on a form an click a button to validate my textbox validation takes place correctly.
If my textbox has the imagebutton enabled and i click this imagebutton validation takes place.
In my composite control i have implicity set imagebutton.CausesValidation = false;
But when clicking this buttonvalidation still occurs. Does anyone has a solution for this problem because i have tried everything i could think of :-(
Thanx a lot
Jan 17, 2010 12:53 AM|jkirkerx|LINK
Thats a needle in the haystack
If using With, did you put a dot in front of it
.CauseValidatiuon = false
Jan 17, 2010 06:44 AM|talsja|LINK
Thanx for your response. Ofcourse i have a . before it otherwise i get a build error. :-)
I have read somewhere that the Causes Validation on childcontrols not working properly. But i don't' know why this would not work.
This is a tuff one. I really do not have the answer :-(
Jan 18, 2010 02:48 PM|talsja|LINK
After a whole weekend fighting with my control i finally found the solution.
I need to set enable viewstate = false for my imagebutton control. So now it doesn't validate Pffffff.
Sometimes it's good to take a break so you can think simple again and whalaa there it is.
As simple as can be :-)
Jan 18, 2010 05:57 PM|jkirkerx|LINK
There's no code example to look at, just your description of the issue at hand.
I have no idea of what your coding style looks like, or how you build your composite control logic.
So help is difficult to offer.
I forgot to memtion the validation group name, and setting it for each object in the group.