can i use only one button to call javascript &server side methods? [Resolved]

Posted by Rajeshk under ASP.NET on 4/10/2013 | Points: 10 | Views : 5423 | Status : [Member] | Replies : 2
hi all,
i have one form having textboxes and one save button i want to validate the from using javascript as wel as store in to the database with the server side method by clicking the button,how can i do that?and also give me the diffrence between onclick,onclientclick,onserverclick events give me the clarification , i am working with javascript and asp,net about how to deal these things,thank you

Thanks&Regards
rajeshkommireddy@gmail.com



Responses

Posted by: Singarapu_Kranthi on: 4/10/2013 [Member] Starter | Points: 50

Up
0
Down

Resolved
yes, you can do that
OnClick="ServerButton1_Click"
OnClientClick="return confirm('its javascript code');"

All HTML Controls have OnClick and OnServerClick events ( ex: input button, img etc..)
All Web Controls have OnClick and OnClientClick events (asp:Button etc..)

OnClick is executed at client-side and done with

.

Rajeshk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajeshk on: 4/10/2013 [Member] Starter | Points: 25

Up
0
Down
Thank You both of you :)

Thanks&Regards
rajeshkommireddy@gmail.com

Rajeshk, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response