Hi everyone,
I have a VB.NET web form with some field validators and Save and Cancel
buttons. What I want to do is on the Cancel button On_Click event,
Response.Redire ct to another page. The problem is that the client-side
validation occurs before even reaching the event for the Cancel button.
I've tried some ways to disable only the client-side validation, but I find
it a poor design that you can't have a command button bypass the jscript
validation routines.
Anyone found a workaround for this? Surely this problem occured before.
Thanks in advance for any help.
Eric 3 3701
You'll love this!
In the cancel button's properties list find "CausesValidati on" and set it to
false.
:)
Justin
"news.public.mi crosoft.com" <mi*******@hotm ail.com> wrote in message
news:Oh******** ******@TK2MSFTN GP11.phx.gbl... Hi everyone,
I have a VB.NET web form with some field validators and Save and Cancel buttons. What I want to do is on the Cancel button On_Click event, Response.Redire ct to another page. The problem is that the client-side validation occurs before even reaching the event for the Cancel button. I've tried some ways to disable only the client-side validation, but I
find it a poor design that you can't have a command button bypass the jscript validation routines.
Anyone found a workaround for this? Surely this problem occured before.
Thanks in advance for any help.
Eric
Hi
What about redirecting on the client
cancelbtn.Cause sValidation = false;
cancelbtn.Attri butes.Add("oncl ick","location. href='theRedire ctPage.aspx';
return false");
--
Best Regards
Vidar Petursson
=============== ===============
Microsoft Internet Client & Controls MVP
=============== ===============
"news.public.mi crosoft.com" <mi*******@hotm ail.com> wrote in message
news:Oh******** ******@TK2MSFTN GP11.phx.gbl... Hi everyone,
I have a VB.NET web form with some field validators and Save and Cancel buttons. What I want to do is on the Cancel button On_Click event, Response.Redire ct to another page. The problem is that the client-side validation occurs before even reaching the event for the Cancel button. I've tried some ways to disable only the client-side validation, but I
find it a poor design that you can't have a command button bypass the jscript validation routines.
Anyone found a workaround for this? Surely this problem occured before.
Thanks in advance for any help.
Eric
Doh, it was almost jumping at me. I thought that this property controlled
if the control generated validation on the server. Wasn't sure about the
client-side.
Thanks a lot!
"S. Justin Gengo" <ge****@krause. com> wrote in message
news:vh******** ****@corp.super news.com... You'll love this!
In the cancel button's properties list find "CausesValidati on" and set it
to false.
:)
Justin
"news.public.mi crosoft.com" <mi*******@hotm ail.com> wrote in message news:Oh******** ******@TK2MSFTN GP11.phx.gbl... Hi everyone,
I have a VB.NET web form with some field validators and Save and Cancel buttons. What I want to do is on the Cancel button On_Click event, Response.Redire ct to another page. The problem is that the client-side validation occurs before even reaching the event for the Cancel button. I've tried some ways to disable only the client-side validation, but I find it a poor design that you can't have a command button bypass the jscript validation routines.
Anyone found a workaround for this? Surely this problem occured before.
Thanks in advance for any help.
Eric
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Arno R |
last post by:
Hi all
I come across a 'feature' of Access (2000) that I don't like and would like to disable.
I am checking if a value already exists in a table.
I a subform I use code like :
Private Sub Choice_BeforeUpdate(Cancel As Integer)
If <validation on inputted value already in table is true> Then
MsgBox "This choice already exists...", vbCritical, "Validation"
Cancel = True
|
by: PeacError |
last post by:
Using Microsoft Visual Studio .NET 2003, Visual C# .NET 1.1:
I apologize if this question has been addressed elsewhere, but I could not
find a reference to it in the search engine for this board.
I have a form that contains a ListView and a GroupBox control. The GroupBox
control itself contains several TextBox Controls. I have Validating and
Validated event handlers set for the GroupBox control, and a
SelectedIndexChanged event...
|
by: Corey Olsen |
last post by:
Can anyone point me to some documentation on bypassing validation controls
when a user selects cancel?
What I have is a user control with a form to fill out information on a
subject. The user should be presented with two buttons a "Submit" and a
"Cancel". When the "Cancel" button is selected all of the items on the user
control should be cleared. However, I have validation controls setup for
each item necessary on the form and when...
|
by: MB |
last post by:
Hi,
I am doing a project which uses asp.net to develop its forms. The form
uses validation web controls to validate the data entered in text
boxes. When Cancel Button is pressed which is to exit from the current
page and go to the previous page, the validation controls activate
because data has not been entered, and the user cannot cancel. I have
used Response.Redirect(webpage) but the validations activates and
unless I enter some data...
|
by: Peter M. |
last post by:
Hi all,
If an event has multiple subscribers, is it possible to cancel the
invocation of event handlers from an event handler?
Or to be more specific:
I'm subscribing to the ColumnChanging event of a datatable, from two
seperate classes. I wish to do some data validating. Due to the nature of
the data validation being done, I seperated this code in two classes.
| |
by: David Veeneman |
last post by:
I am writing a control that relies on its host to validate the contents of
one of its fields. The control fires a custom 'FooNeedsValidating' event and
passes the field's data with the event. The host handles the event,
validates the data and returns the validation results to the control by a
callback to a control method, SetFooError(). All of that works great.
If the host returns false on the validation, I display an error glyph next
to...
|
by: Darin |
last post by:
I have a form w/ a textbox and Cancel button on it. I have a routine to
handle textbox.validating, and I have the form setup so the Cancel
button is the Cancel button.
WHen the user clicks on the cancel button, the textbox.validating is
being called. I don't want it to be since they are exiting the screen
the validation doesn't have to be done.
How can I do that.
|
by: Frank O'Hara |
last post by:
I think I'm losing my mind, granted it is kind of late here so...
I'm trying to do some simple validation on the client as keys are
pressed. The validation routine works well enough however I can't
seem to cancel the event should the validation fail. Well more
accurately, I can't cancel the keyup event. When I hook the following
routine to the keydown event it works well and an invalidation cancels
the event. I'm hooking the...
|
by: Steve |
last post by:
In VB6 I have a screen the has a text box and a datagrid
If I click the datagrid, the 1st event is to validate the textbox and
then the 2nd event is a datagrid mousedown event. If a get an error
message in the textbox validate it seems the mousedown event is never
executed.
In VB.Net it executes the textbox validation and then displays the
error, but still executes the mousedown event. It appears that I have
to explicitly...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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: 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: 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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |