Question : ASP WIZARD Control - javascript Validation

In my page I have a wizard control which consists of 4 steps. In 2nd step I have a datagrid, in which i have textbox. I have some javascript Validation Code also. Now If I am keeping one button and in that button click's event i invoke the JavaScript then it is running fine. [Button1.Attributes.Add("onclick", "return validate()")]
But I want to invoke those Javascript code when I press the Next Button of the Wizard Control. Already some serverside code is written in Wizard1_NextButtonClick event. But Before executing that server-side code I want to validate some data through Javascript.

How to accomplish this ??

Answer : ASP WIZARD Control - javascript Validation

The Client Side click event will be handled before the server side click event.  Put the javascript call on the Next Button and use the return keyword for example:

OnClientClick="return Validate();"

If the javascript function returns true, off it goes to server side land.  if not, the post back will not occur and you validation notifications should then show.

Cheers,

Andrew
Random Solutions  
 
programming4us programming4us