how to stop postback of asp button which is havin client side and serverside events....
-
I have a page where i have some client side validations on a button click and also some serverside event. I am using a asp button. I know its doing some server events so postback will occur but is there anyway i can stop that postback? Or do i have to use update panel of ajax only..But I prefer not to use this since it postsback but doesnt show its postbacking!! Please do help
-
I have a page where i have some client side validations on a button click and also some serverside event. I am using a asp button. I know its doing some server events so postback will occur but is there anyway i can stop that postback? Or do i have to use update panel of ajax only..But I prefer not to use this since it postsback but doesnt show its postbacking!! Please do help
If you want to have some server side code which should be executed than it will definitely do a Postback. In this case, you should make use of AJAX.
Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
-
I have a page where i have some client side validations on a button click and also some serverside event. I am using a asp button. I know its doing some server events so postback will occur but is there anyway i can stop that postback? Or do i have to use update panel of ajax only..But I prefer not to use this since it postsback but doesnt show its postbacking!! Please do help
user UpdatePanel to avoid that
Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/
-
I have a page where i have some client side validations on a button click and also some serverside event. I am using a asp button. I know its doing some server events so postback will occur but is there anyway i can stop that postback? Or do i have to use update panel of ajax only..But I prefer not to use this since it postsback but doesnt show its postbacking!! Please do help
-
I have a page where i have some client side validations on a button click and also some serverside event. I am using a asp button. I know its doing some server events so postback will occur but is there anyway i can stop that postback? Or do i have to use update panel of ajax only..But I prefer not to use this since it postsback but doesnt show its postbacking!! Please do help
If you want to stop a postback, return 'false' on the client side event. Of course, if you stop postback, then your server side code won't run. If you want the server side code to run without any sort of postback, not even AJAX, then you are seriously deluded and need to give up until you've read some basic books, that would make your question retarded. If you want to stop the server side code from running based on a condition in the client side code, just return false to stop the postback.
Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
-
I have a page where i have some client side validations on a button click and also some serverside event. I am using a asp button. I know its doing some server events so postback will occur but is there anyway i can stop that postback? Or do i have to use update panel of ajax only..But I prefer not to use this since it postsback but doesnt show its postbacking!! Please do help
hi in javascript validation function write return false so it stops the page excution