P
Papanii
Hello Guys,
I have a little problem that i need some ideas as to how to
solve. I have a form that sends some data to the server once filled. Now,
for this form i am using asp.net validation controls to ensure certain
fields are filled and also have the correct data format. What i want to
have happen is once the form has been validated and the submit button
clicked, i want a javascript function to fire before continuing with the
server side code. Now, i thought that using the submit button's
onclientClick property would work for this however, this fires the
javascript function regardless of whether or not the validation is
successful. So i decided to add the
Page.ClientScript.RegisterClientScriptBlock at the begining of the server
side code however this only seems to fire after the server side code
completes. I am assuming it has something to do with the switching of
running thread within the process however i am not sure. Does anyone have an
idea as to how i can get the javascript code to run only after validation is
successful but before the server side code runs.
Thanks
--Papanii
I have a little problem that i need some ideas as to how to
solve. I have a form that sends some data to the server once filled. Now,
for this form i am using asp.net validation controls to ensure certain
fields are filled and also have the correct data format. What i want to
have happen is once the form has been validated and the submit button
clicked, i want a javascript function to fire before continuing with the
server side code. Now, i thought that using the submit button's
onclientClick property would work for this however, this fires the
javascript function regardless of whether or not the validation is
successful. So i decided to add the
Page.ClientScript.RegisterClientScriptBlock at the begining of the server
side code however this only seems to fire after the server side code
completes. I am assuming it has something to do with the switching of
running thread within the process however i am not sure. Does anyone have an
idea as to how i can get the javascript code to run only after validation is
successful but before the server side code runs.
Thanks
--Papanii