System.EventArgs
(1)
EventArgs
(1)
Response.Redirect
(1)
System.Object
(1)
Validation
(1)
Visual
(1)
Redirect
(1)
BtnCancel.Click
(1)

Visual Basic dotnet - buttons on a web page

Asked By Morto
12-Feb-08 04:08 PM
I added two buttons to a web page.  One has 'Causes Validation' set to True -
the othe to false.

When I click the button set to 'Causes Validation' - the expected validation
messages appear.

When I click the button with no validation - nothing happens.
What I expected was that the "Response.Redirect" line would be fired.

Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnCancel.Click
Response.Redirect("Default.aspx")
End Sub

If I set a stop point at the subroutine - it is ignored.

Any suggestions as to what I am missing?

Did you double check that CausesPostback is set to True?

Asked By dotNetDav
14-Mar-08 03:44 PM
Did you double check that CausesPostback is set to True?

David

======================================
David McCarter [Microsoft MVP]
www.dotNetTips.com
David McCarter''''s .NET Coding Standards available at:
http://www.cafepress.com/geekmusicart.1654787045
Post Question To EggHeadCafe