Link to home
Create AccountLog in
Avatar of MRNMurthy
MRNMurthyFlag for India

asked on

ASP.NET 2.0 required field validator is not working on production server

when I use a REQUIRED FIELD VALIDATOR on a page it works fine on my machine (Development Mechine), but when I deploy the pages to production Server the Validator does not work.

This problem occurs across the application. The development mechine and producton machine are running under Windows 2003 server (service pack-2) operating system.


UI-Code
----------
<asp:TextBox runat="server" ID="txtTelephoneNumber" CssClass="Ms-long" MaxLength="40"
                                    Width="150" TabIndex="3">
 </asp:TextBox>
 <asp:RequiredFieldValidator runat="server" ErrorMessage="Please enter Telephone number"
                                    ID="reqTelephone" Display="Dynamic" ControlToValidate="txtTelephoneNumber">
</asp:RequiredFieldValidator>

<asp:Button runat="server" Text="OK" ID="btnSave"  OnClick="btnSave_Click" CssClass="Ms-ButtonHeightWidth"    TabIndex="4" />

I have copied the aspnet_client folder from development system to production server then also is not working.
                     
Avatar of REA_ANDREW
REA_ANDREW
Flag of United Kingdom of Great Britain and Northern Ireland image

Can you elaborate on the actual problem, i.e. could you provide a specific error?

Andrew
Avatar of MRNMurthy

ASKER

There is no specific error message. After Page load, on clicking "OK" button page is  not getting validated and it's not showing any error messages.
Both client validation and server validation taken place whenever clicking "OK" button instead of just client validation(It means post back is happening on the button click).
ASKER CERTIFIED SOLUTION
Avatar of MRNMurthy
MRNMurthy
Flag of India image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer