Dimitry the Cause validation doesn't prevent the form to be submited to the server, what happens is when is set to false it doesn't cause any validation of the form, the page is still submited to the server and the onclick event of the button is run.
Whatr Rick was saying is that if you only want to clear values and nothing more you could create a Client Javascript function and then on the click of the html button call that function so nothing is post to the server.
>>Why not use some client code to do this with JavaScript? It seems all youwant to do is clear some values. Use OnClientClick() and then run a function that clears out the values:
>>
>>
>>function ClearVals()
>>{
>> document.getElementById('txtName').value = "";
>> document.getElementById('txtAddress').value = "";
>>}
>>
>>
>>This sidesteps the whole issue of posting back and otherwise submitting values that you do not want changed on the server.
>>
>>+++ Rick ---
>
>First, thank you for your suggestion.
>
>But how is the JavaScript approach different from clearing values in the onclick method of the button that does not post back (property CausesValidation set to false)?
Alexandre Palma
Senior Application Architect