Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

requiredfieldvalidator working diff between local and production 1

Status
Not open for further replies.

meckeard

Programmer
Aug 17, 2001
619
US
Hi all,

My requiredfieldvalidator controls works fine locally. If all the required fields are not entered, the text appears and alerts the user.

When I uploaded my web paged to my hosting account, I noticed that the pages still submit. And when the page posts, only then does the required text appear.

Why would there be a difference between my local PC and the web host? I am using the same PC/Browser on both (Windows 2k Server and IE6).

Thanks,
Mark
 
make sure your virtual directory contains the aspnet_client folder. It contains the javascripts needed for client-side validation, which is what is not happening. It should be there when they created your site, but if not, just copy it up from your local machine.

Greetings,
Dragonwell
 
Ahh, that was it. Thanks.

1 star for you!

Mark
 
did the same ..but did not work for me! i uploaded the whole folder structure

aspnet_client\system_web\1_0_3705_0 to my hosting site virtual directory

there were 3 files in the 1_0_3705_0 folder.
SmartNav.js
SmartNavIE5.js
WebUIValidation.js

No client side validation is happening at all when I deploy the app even though it works OK on my PC.

I'm running .NET framework 1.0 ... and it looks like my ISP is running .NET 1.1 does it matter at all?
 
got it!
copied or renamed the folder as 1_1_4322 which is the version that my ISP is running .. instead of version 1_0_3705_0 on my PC
 
Frnds !!! do chk your Code in any Mozilla browsers.

Like Firefox or Netscape.

I cant' get client side validation there.
The whole form gets postback and NO ALERTS of <asp:validationsummary>


Any sugestions??

Everything is working fine on IE

Varun Sood.

 
Always check for IsValid in your postback handlers before using the posted data. IsValid will go through each validotor in your form and do a server-side check.
Code:
if(!(Page.IsValid)){
    return;
}

//else, posted data passed validators....

[pipe]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top