4

Hello i have a Big ASP Page and i must set in every ASP Button this:

CausesValidation="False" 

to work. If don't it cant run a codebehind function.

can somebody explain to me why this is so?

Eray Geveci
  • 1,099
  • 4
  • 17
  • 39
  • 1
    Do you have a validator control in your page? If so, do you use ValidationGroups? – rikitikitik Jan 07 '13 at 06:56
  • There must me validators on your page that are failing which is stopping the control to run a code behind function. you need to search the validator which is failing and do the needful. – Ankit Jan 07 '13 at 06:58

1 Answers1

8

It seems you are using Validation controls in your page. Your page must pass the validation before postback to server. Below is the functionality of CausesValidation property:

  • The CausesValidation property specifies if a page is validated when a Button control is clicked.

  • Page validation is performed when a button is clicked by default.

  • This property is mostly used to prevent validation when a cancel or reset button is clicked.

aspnewbie
  • 7
  • 4
phnkha
  • 7,782
  • 2
  • 24
  • 31