VB.NET if button1 caused post back then....

Posted by Jonesy on Stack Overflow See other posts from Stack Overflow or by Jonesy
Published on 2010-04-05T13:32:29Z Indexed on 2010/04/05 13:33 UTC
Read the original article Hit count: 246

Filed under:
|
|
|

Hi folks,

I have a situation where I need to ignore parts of page load sub inside a isPostback = true. Basically inside the isPostBack I want something like if button1 caused postback.... do this else do this...

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    If IsPostBack = True Then

        If TextBox1.Text <> String.Empty Then

            CheckDate()
        End If

    End If


End Sub

© Stack Overflow or respective owner

Related posts about vb.net

Related posts about postback