Hello all,
Okay - problem of the day. Here goes.
I created an input form with server side controls and vaildation controls on it. There are two web form (not html) buttons - submit and clear.
Now, when the vaildation controls are challenged, the clear button code does not function - as it executes on the server and the validation controls are client side based.
I'm calling the clear on the button_Click event as follows:
field.text = ""
I tried using Javascript with a similiar function:
<script language="javascript">
function clearfields()
field.text = ""
</script>
and called it on the onClick event of the button (i.e. onClick"clearfields()"
It couldn't recognize the function in the ascx file.
Does anyone have a solution to clearing the text / value of server side controls (text and labels) that is client side based? I think it can be done - but I stuck again.
thanx in advance?
inzo
Okay - problem of the day. Here goes.
I created an input form with server side controls and vaildation controls on it. There are two web form (not html) buttons - submit and clear.
Now, when the vaildation controls are challenged, the clear button code does not function - as it executes on the server and the validation controls are client side based.
I'm calling the clear on the button_Click event as follows:
field.text = ""
I tried using Javascript with a similiar function:
<script language="javascript">
function clearfields()
field.text = ""
</script>
and called it on the onClick event of the button (i.e. onClick"clearfields()"
It couldn't recognize the function in the ascx file.
Does anyone have a solution to clearing the text / value of server side controls (text and labels) that is client side based? I think it can be done - but I stuck again.
thanx in advance?
inzo