473,386 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Implementing a cancel button

Hi;

I am guessing how to do this is very easy - but I can't find it anywhere. I
have a cancel button on my form and if the user clicks it, I want to perfomr
no validation and redirect to a specific page with the browser url showing
the page redirected to.

How can I do this?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Mar 9 '06 #1
3 1367
http://msdn2.microsoft.com/en-us/lib...alidation.aspx
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"David Thielen" wrote:
Hi;

I am guessing how to do this is very easy - but I can't find it anywhere. I
have a cancel button on my form and if the user clicks it, I want to perfomr
no validation and redirect to a specific page with the browser url showing
the page redirected to.

How can I do this?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Mar 9 '06 #2
Hi;

First off thank you - that answers how to avoid the validation.

Other question - how do I have it redirect to another page on the click?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

"Phillip Williams" wrote:
http://msdn2.microsoft.com/en-us/lib...alidation.aspx
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"David Thielen" wrote:
Hi;

I am guessing how to do this is very easy - but I can't find it anywhere. I
have a cancel button on my form and if the user clicks it, I want to perfomr
no validation and redirect to a specific page with the browser url showing
the page redirected to.

How can I do this?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Mar 9 '06 #3
Upon Button_Click event you would use the Response.Redirect with any of its 2
forms of syntax that are available:
http://msdn2.microsoft.com/en-us/lib....redirect.aspx

1- HttpResponse.Redirect (String) Redirects a client to a new URL and
specifies the new URL.

2- HttpResponse.Redirect (String, Boolean) Redirects a client to a new URL.
Specifies the new URL and whether execution of the current page should
terminate.

e.g. Response.Redirect("page1",true)
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"David Thielen" wrote:
Hi;

First off thank you - that answers how to avoid the validation.

Other question - how do I have it redirect to another page on the click?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

"Phillip Williams" wrote:
http://msdn2.microsoft.com/en-us/lib...alidation.aspx
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"David Thielen" wrote:
Hi;

I am guessing how to do this is very easy - but I can't find it anywhere. I
have a cancel button on my form and if the user clicks it, I want to perfomr
no validation and redirect to a specific page with the browser url showing
the page redirected to.

How can I do this?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Mar 9 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Mike L | last post by:
I have a child form frmDataEntry call up another child form frmDealerSearch. If the user clicks on cancel on frmDealerSearch, I want to close frmDealerSearch and put the focus on txtDealerNum on...
1
by: Hai Le | last post by:
Hi, I'm trying to write a program for Smartphone 2003 device bu eVC++ 4.0. The interface consists of couple of buttons ( i used pushbutton type), when you press the button, the program start to...
3
by: Mvk | last post by:
Hi; I have a simple aspx form. I have put a textbox and 2 buttons on it. The textbox is linked to a requiredfieldvalidator. Click on button 1 (= ok button) = Store value in textbox in...
3
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...
14
by: clintonG | last post by:
This is an appeal for peer support sent to Microsoft as will be noted in closing. The Login control does not include a Cancel button. The only option is to convert the Login control to a...
1
by: holysmokes99 | last post by:
I am trying to implement a cancel button on my application that ingests a bunch of data from a text file into a database. I have not worked too much with threads, so I am having some trouble. I had...
4
by: martin | last post by:
Hello, Is there a way to make a kind of "cancel" button on a form? Suppose you accidently changed or overwrote some data in a form, then I'd like to leave this form at once and cancel any...
0
by: Eraser | last post by:
Hi to all .NET guru guys... I have a problem in my delete button inside gridview. How to avoid postback on when i select cancel on confirmation message? But postback is okay on Ok confirmation....
5
by: ghjk | last post by:
I have "cancel" button in php files. I want to write common javascript function for cancel button. When user click cancel button I want to clear php form data. Is it possible? <input id="Cancel"...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
jinu1996
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.