i have two problem
1. how to call a javascript function from form page and also how to call c# function from javascript because when user click on button i want to validate field of form and if validation is correct then call to c# function .
please any no about this reply
2. in second i have button when i click on button a calender shown and i collect date but problem is when i click on button i page reload , i want to stop reloading of page
in coding i set the value of calender visible true
please any body no about answer reply me
The article named
how to check if a textbox contains a number contains information on how to use JavaScript in an asp.net application.
As for the validation, if your Server Code does the validation, you will need to do an Ajax call to the server. Consider using both server side and client side validation. Client side validation can be achieved by using controls like the RequiredFieldValidator, RegualarExpressionValidator, CustomValidator...etc.
As for your calendar issue.
The Calender requires a postback to the server (each date is actually a link button). To keep the Whole page from updating place the calendar control into an UpdatePanel. The update panel will do an asynchronous call to the server and only that section of the page will be updated when the page is returned to the browser.
If you start using Ajax in your site it will become smoother, however the above mentioned article on how to include JavaScript into your page will have to be modified to use the ScriptManager in order to register your scripts...otherwise they will not work properly after a postback has occurred.
Use the
MSDN Library to research the controls I've mentioned here...give it a try...and when you have more specific problems with implementation get back to us.
-Frinny