wsyeager Posted January 10, 2005 Posted January 10, 2005 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? Quote Thanks, Bill Yeager (MCP, BCIP) Microsoft Certified Professional Brainbench Certified Internet Professional, .Net Programmer, Computer Programmer YeagerTech Consulting, Inc.
kahlua001 Posted January 10, 2005 Posted January 10, 2005 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. Quote
Administrators PlausiblyDamp Posted January 10, 2005 Administrators Posted January 10, 2005 Do you have any other controls / validators on the page? If any of them are failing the validation then postback will not occur. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
wsyeager Posted January 12, 2005 Author Posted January 12, 2005 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. Quote Thanks, Bill Yeager (MCP, BCIP) Microsoft Certified Professional Brainbench Certified Internet Professional, .Net Programmer, Computer Programmer YeagerTech Consulting, Inc.
hrabia Posted January 13, 2005 Posted January 13, 2005 It seems to be true :) http://support.microsoft.com/default.aspx?scid=kb;EN-US;889877 Quote A man and a dog have an average of three legs. Beaware of Statistics.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.