Validations Issue server side and client side [Resolved]

Posted by Sravan661 under C# on 1/10/2014 | Points: 10 | Views : 800 | Status : [Member] | Replies : 5
Hi,
I am using server side validations in my application, i used validation group for all the controlos involved in validation.
Now i need to run a javascript function before performing these server validations.

the issue is both javascript and server validations should fire for same button click

but here when my javascript returns true also the server validations are not firing and the server method is executing which is wrong in my case.

so please suggest me with a solution

sravan


Responses

Posted by: kgovindarao523-21772 on: 1/10/2014 [Member] [MVP] Bronze | Points: 50

Up
0
Down

Resolved
Hi,

Please use Page_ClientValidate() in the javascript, instead of returning true.
so, the server validation will be performed.
when you return false, the server validation however doesn’t perform.


Thank you,
Govind

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

Posted by: vishalneeraj-24503 on: 1/10/2014 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Kindly post your code.

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

Posted by: Sravan661 on: 1/10/2014 [Member] Bronze | Points: 25

Up
0
Down
Sorry i cant post my code as i work on remote machine

sravan

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

Posted by: vishalneeraj-24503 on: 1/10/2014 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Have you applied your validation groups to Button also?
Please check that one.

If not then give validation groups to your button control.

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

Posted by: Sravan661 on: 1/10/2014 [Member] Bronze | Points: 25

Up
0
Down
yes i did so
but not worked

sravan

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

Login to post response