Visual Basic dotnet - buttons on a web page

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?TW9ydG9u?=

    Visual Basic dotnet - buttons on a web page

    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.Redir ect" line would be fired.

    Private Sub btnCancel_Click (ByVal sender As System.Object, ByVal e As
    System.EventArg s) Handles btnCancel.Click
    Response.Redire ct("Default.asp x")
    End Sub

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

    Any suggestions as to what I am missing?



  • =?Utf-8?B?ZG90TmV0RGF2ZQ==?=

    #2
    RE: Visual Basic dotnet - buttons on a web page

    Did you double check that CausesPostback is set to True?

    David

    =============== =============== ========
    David McCarter [Microsoft MVP]

    David McCarter''''s .NET Coding Standards available at:



    "Morton" wrote:
    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.Redir ect" line would be fired.
    >
    Private Sub btnCancel_Click (ByVal sender As System.Object, ByVal e As
    System.EventArg s) Handles btnCancel.Click
    Response.Redire ct("Default.asp x")
    End Sub
    >
    If I set a stop point at the subroutine - it is ignored.
    >
    Any suggestions as to what I am missing?
    >
    >
    >

    Comment

    Working...