I have a submit button. 2 methods to be called. 

1. Java script function for validation of controls(Client)- onclientclick event
2. C# method button\_submit\_click (Server side database access)-onclick event.

When I run this application, 1st function works well; but an exception is thrown immediately for the 2nd function, because of empty values of the controls.

how can I handle this? I tried to call the 2nd fn from 1st one. But it is tedious.

I have an idea of using an If statement such as

`if(txt_name.Text!=="") { //my c# logic in default.aspx.cs }`

Any other methods advisable?