Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: Client side validation doesn't work on production server

Reply
Thread Tools

Re: Client side validation doesn't work on production server

 
 
Peter Blum
Guest
Posts: n/a
 
      08-30-2004
Without the exact error message, we can only guess the cause.

One of the most common problems when deploying to another server is that the
user forgets to deploy the /aspnet_client folder with the validation
scripts.

Since each ASP.NET version and service pack offers its own
webUIValidation.js file, this is the most reliable way to install the
client-side scripts:
On the server, run:
[windows]\microsoft.net\framework\[version]\aspnet_regiis.exe -c

--- Peter Blum
www.PeterBlum.com
Email: http://www.velocityreviews.com/forums/(E-Mail Removed)
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

"Carlos Esparza via .NET 247" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm getting an error from a page where a custom validator is located.
> The strange thing is that the page works correctly on my local machine
> and on a developement server I've got. But it doesn't work on the
> production server.
>
> This is the clientvalidationfunction
>
> function ClientValidate(source, arguments)
> {
> /*Check required fields info*/
> if( document.all.AccountAdd_tbxUserName.value == "" ||
> document.all.AccountAdd_tbxPassword.value == "" ||
> document.all.AccountAdd_tbxPasswordConf.value == "" ||
> document.all.AccountAdd_tbxAnswer.value == "" ||
> document.all.AccountAdd_tbxFirstName.value == "" ||
> document.all.AccountAdd_tbxLastName.value == "" ||
> document.all.AccountAdd_tbxAddress.value == "" ||
> document.all.AccountAdd_tbxState.value == "" ||
> document.all.AccountAdd_tbxCity.value == "" ||
> document.all.AccountAdd_PaymentCtl_tbxBillFirstNam e.value == "" ||
> document.all.AccountAdd_PaymentCtl_tbxBillLastName .value == "" ||
> document.all.AccountAdd_PaymentCtl_tbxBillAddress. value == "" ||
> document.all.AccountAdd_PaymentCtl_tbxBillZIP.valu e == "" ||
> document.all.AccountAdd_PaymentCtl_tbxBillEmail.va lue == "" )
> {
>

alert("<%Response.Write(Me.dsRM.Tables(0).Rows.Fin d(Constants.Strings.Accoun
tInfoEdit_strRequiredFields).ItemArray(1))%>");
> }
> /*Check password and password confirmation evenness*/
> else if( document.all.AccountAdd_tbxPasswordConf.value !=

document.all.AccountAdd_tbxPassword.value )
> {
>

alert("<%Response.Write(Me.dsRM.Tables(0).Rows.Fin d(Constants.Strings.Accoun
tInfoEdit_strPswdConfirmation).ItemArray(1))%>");
> document.all.AccountAdd_tbxPasswordConf.focus;
> return false;
> }
> /*Check the dropdowns for selections*/
> else if ( document.all.AccountAdd_ddlQuestion.selectedIndex == 0 )
> {
>

alert("<%Response.Write(Me.dsRM.Tables(0).Rows.Fin d(Constants.Strings.Accoun
tInfoEdit_strQuestionError).ItemArray(1))%>");
> arguments.IsValid = false;
> }
> else if ( document.all.AccountAdd_ddlCountry.selectedIndex == 0 )
> {
>

alert("<%Response.Write(Me.dsRM.Tables(0).Rows.Fin d(Constants.Strings.Accoun
tInfoEdit_strCountryError).ItemArray(1))%>");
> arguments.IsValid = false;
> }
> else if ( document.all.AccountAdd_PaymentCtl_ddlBillCountry. selectedIndex

== 0 )
> {
>

alert("<%Response.Write(Me.dsRM.Tables(0).Rows.Fin d(Constants.Strings.Accoun
tInfoEdit_strBillCountryError).ItemArray(1))%>");
> arguments.IsValid = false;
> }
> /*Check the amount to pay or the promocode*/
> else if ( document.all.AccountAdd_PaymentCaptureCtl_tbxPromo Code.value ==

"" &&
> document.all.AccountAdd_PaymentCaptureCtl_ddlAmoun t.selectedIndex == 0)
> {
>

alert("<%Response.Write(Me.dsRM.Tables(0).Rows.Fin d(Constants.Strings.Accoun
tNew_strAmountOrPromo).ItemArray(1))%>");
> arguments.IsValid = false;
> }
> }
>
> It basically checks the information contained in the page's textboxes and

dropdowns
> to ask for required fields or selections.
>
> I would appreciate any help.
>
> --------------------------------
> From: Carlos Esparza
>
> -----------------------
> Posted by a user from .NET 247 (http://www.dotnet247.com/)
>
> <Id>m1JCv7Bhzk+b14+j8b287A==</Id>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to execute client-side code _after_ client-side validation? Bogdan ASP .Net 2 06-09-2008 01:31 PM
Client side script after client side validation with asp.net 2.0 Boss302 ASP .Net 0 11-21-2006 08:43 AM
Using both server side validation and client side validation =?Utf-8?B?dmlkeWE=?= ASP .Net 1 06-02-2005 09:45 PM
Re: Client side validation doesn't work on production server Hermit Dave ASP .Net 0 08-28-2004 08:27 PM
ASP.NET Web Forms Validation Controls are Server-Side or Client-Side Validation? Matt ASP .Net 14 01-30-2004 09:15 AM



Advertisments