I have button that is calling
javascrip:parent.Test(2)
method.....
anyway I have to call c# method from
javascript method Test().
please help me
thanks
Abdun Nabi Sk
You can't really use JavaScript for this.
You're going to have to use Ajax to call server side code.
Are you using Ajax in your web project currently?
If you use Ajax, the page is "partially" posted back to the server, your request is processed and that section of the page is updated.
You can use pure Ajax to do this if you want to, but .NET now has an Ajax framework that simplifies things.
Instead of putting in Ajax calls to do validation, you should consider using the client side Validator objects available to you (eg RequiredFieldValidator, RegularExpressionValidator ...etc).
You should still validate on the server....I would place a call to your Check() method in your button click event and if it return's true, would allow further processing to take place.
-Frinny