Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: cancel request

Thread Tools

Re: cancel request

Ken Cox [Microsoft MVP]
Posts: n/a
Hi Adrian,

You'd get the best response from a client-side event which goes to the
"Cancel" page directly without requiring a postback and the processing that
it entails.

You could do this by using an old-fashioned HTML button or a linke, or by
inserting a little JavaScript into the server control like this:

Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
Button2.Attributes.Add("onclick", _
"location.href='cancel.aspx';return false;")
End Sub

Microsoft MVP [ASP.NET]

"Adrian" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have built an ASP.Net (VB.Net) application. When the user clicks to go
>to a certain page, I need the ability to cancel the request to view the
>page (on occasions) or at least redirect back to the previous (current
> How do I do this?
> Many Thanks

Reply With Quote
Posts: n/a
Thanks Ken, however the logic which decides whether I perform some actions or no actions take place on the code-behind of the target page. And the request for the target page is done in javascript from a button on the source page, so I have no scope for putting logic on the source page?? Hope that makes sense
Reply With Quote

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
Potentially dangerous Request.Form value for Cancel button Click =?Utf-8?B?U2VyZ2V5IFp1eWV2?= ASP .Net 1 10-05-2006 04:25 PM
cancel network password request Targ *** Computer Support 9 07-19-2006 10:34 PM
cancel POST request Pavel Dvorkin ASP .Net 3 06-02-2006 09:45 AM
HELP CANCEL CANCEL CANCEL Carmen Rosario Computer Support 7 04-06-2005 11:04 PM
Re: Accessing Request.InputStream / Request.BinaryRead *as the request is occuring*: How??? Brian Birtle ASP .Net 2 10-16-2003 02:11 PM