postback problem...

wsyeager

Centurion
Joined
Apr 10, 2003
Messages
140
Location
Weston, FL
I have a simple button and textbox on a webform with a RequiredFieldValidator tied to the textbox control. The problem is that a postback never occurs on the webform by clicking the button even when I have something inside the textbox.

If I don't have the validator control on the webform, then the button clicked event gets fired (causing the postback - I have a breakpoint set in the Button.Clicked event of the button on the webform).

The CausesValidation property of the button is set to True, but I have something inside the textbox and it still doesn't postback. I thought that a postback will NOT occur only if there is some kind of validation or required error with the control. In this case, something is inside the textbox, so how come the postback doesn't occur?

Does anyone know what the problem is with this?
 
There is a property on the validator, enableclientscript or something like that, if that is set to true, then asp.net will do the validation ont eh client and not post back.
 
I did the following to resolve the problem:

On the webserver with the problem, run this command:
aspnet_regiis.exe -c
from [windows]\microsoft.net\framework\[version]

It copies the correct files for the version of ASP.NET you are running into each domain defined in IIS.
 
Back
Top