Groups | Blog | Home
all groups > dotnet general > february 2008 >

dotnet general : Visual Basic dotnet - buttons on a web page


Morton
2/12/2008 1:08:01 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?


dotNetDave
3/14/2008 12:44:02 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


[quoted text, click to view]
AddThis Social Bookmark Button