Hi, I've just published a test web site on the internet with a simple form
and some client side validation controls. On my development PC if I click
submit without entering any data the validation controls work and prompt me
as expected.
On the live web server I do exactly the same thing but no validation is
performed and the form is submitted.
How can this be?
Have I missed something in the setup script? I added both the primary
output files and the content files to the build script is there anything
else I need to add?
Thanks,
Gareth 3 1271
Client side validation is done using the scripts in the "aspnet_cli ent"
folder. Does this folder exist in your application? It's usually installed
into each website (in IIS) when the framework is installed. If your
application is running in a virtual directory, then the aspnet_client folder
needs to be in the root folder of that website.
Hope this helps,
Mun
"Gareth" <gcparris at hotmail dot com> wrote in message
news:O8******** ******@TK2MSFTN GP09.phx.gbl... Hi, I've just published a test web site on the internet with a simple form and some client side validation controls. On my development PC if I click submit without entering any data the validation controls work and prompt
me as expected. On the live web server I do exactly the same thing but no validation is performed and the form is submitted. How can this be? Have I missed something in the setup script? I added both the primary output files and the content files to the build script is there anything else I need to add?
Thanks, Gareth
Also note that if client-side validation fails for a reason or another you
need to check Page.IsValid before any validation-dependant critical code
runs. This way you can be sure that no incorrect input is passed through
even if client-side validation would fail. Server-side validation always
fires automatically with built-in validation controls, but you must manually
check Page.IsValid.
--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
"Gareth" <gcparris at hotmail dot com> wrote in message
news:O8******** ******@TK2MSFTN GP09.phx.gbl... Hi, I've just published a test web site on the internet with a simple form and some client side validation controls. On my development PC if I click submit without entering any data the validation controls work and prompt
me as expected. On the live web server I do exactly the same thing but no validation is performed and the form is submitted. How can this be? Have I missed something in the setup script? I added both the primary output files and the content files to the build script is there anything else I need to add?
Thanks, Gareth
Thank you both for those tips. I have now solved my problem.
1) I had not set permission for the custom account to access (read) the
aspnet_client directory.
2) I was not checking the Page.IsValid property on the submission.
Implementing both of these cured my problems.
Many thanks once again!
Regards,
Gareth
"Gareth" <gcparris at hotmail dot com> wrote in message
news:O8******** ******@TK2MSFTN GP09.phx.gbl... Hi, I've just published a test web site on the internet with a simple form and some client side validation controls. On my development PC if I click submit without entering any data the validation controls work and prompt
me as expected. On the live web server I do exactly the same thing but no validation is performed and the form is submitted. How can this be? Have I missed something in the setup script? I added both the primary output files and the content files to the build script is there anything else I need to add?
Thanks, Gareth
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: |
last post by:
Hello Guys,
I am using the validation controls to validate my data.
But the problem is "The page is still being posted to
server".
I want to get rid of the round trips to server. Are there
any get arounds for this problem apart from the
traditional JavaScript?
|
by: Matt |
last post by:
I want to know if ASP.NET Web Forms Validation Controls are Server-Side or
Client-Side form validation? Since I think each validator control can select
either 1) JavaScript based error dialog or 2) show the error message next to
the control. For example, if the text field is empty with RequiredField
Validator control, it can show the value in ControlToValidate property in
two ways as I mentioned.
Please advise. Thanks!
|
by: Earl Teigrob |
last post by:
I wanted my "Terms and Conditions" Checkbox control to participate in my
ASP.NET validation just like all the the other controls on the page. After
some time of searching the web for an example of how to do this, I created
the script to do it and thought I would share it. Its a littel messy but
does the job. If anyone has a better solution, please let me know.
//Client Site Event Handler to put in Page_Load event...
|
by: |
last post by:
Hi
Has anyone any experience using client side validation with asp.net forms.
Specifically I'd like to know...
1. How do you attach client side code web controls (a button), like a
JavaScript 'onclick' event for example?
2. Any issues anyone has experienced using client side validation with
asp.net forms?
|
by: Mong |
last post by:
Hi,
I have a webform with various asp controls on it such as textboxes and
dropdownlists. I'm fairly new to asp.net coming from VB6 and am
wondering when it's best to use client side events and when it's best
to use server side events.
For example, if a textbox is to contain a date I want to validate the
date when that textbox loses the focus. If the date is not valid I
make visible a label next to the textbox telling the user it's
| |
by: Sun Jian |
last post by:
Hi,
I am trying to customize the asp.net validation to achieve the following:
Upon submitting the form, client side validation will run, and it will stop
at the first error detected. For example if both UserID and Password text
fields are required but neither is filled in, I'd like to display the error
message (a dialogbox) "Please enter the User ID". And only after the user
has filled in UserID, it will display "Please enter the...
|
by: Ben Fidge |
last post by:
Hi
I'm interested to know what peoples opinions are on using the Client-side
Validators in ASP.NET? I use them very heavily but am experiencing the odd
occassion when users have either intentionally or inadvertantly bipassed
them.
Any ideas on how this could happen. I know that a determined hacker can push
data into http context and viewstate. But other than that, would disabling
javascript in the browser allow a user to bipass...
|
by: Terry Olsen |
last post by:
How would I go about validating on the client side before a post back? I do
it now in the code with something like "if TextBox.Text="" then..." I'd
like to do it on the client but I've never been any good at html or jscript.
|
by: Hong Hao |
last post by:
Recently, I was trying to modify an existing aspx page when client-side
validation on that page stopped working. I searched this group and the web
in general and found that other people have had the same issue. However,
none of the suggested fixes solved my particular problem. I tracked down the
cause of the problem, which is related to aspx page parser's handling of
controls inside html comments. The problem may be quite common and well...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |