0
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        'Dim userName As String = Request.QueryString("Name")
        'MsgBox(userName)
       


        Session("id") = Session("id")
        Dim userName As String = User.Identity.Name

        Dim usr As MembershipUser = Membership.GetUser(userName)
        'Email.Text = usr.Email
        Email.Text = usr.Email
        ConfirmEmail.Text = usr.Email
        MsgBox("jhjkh")
        



        ' ConfirmEmail.Text = usr.Email



    End Sub

i have button_click function on the same page...i want that when i click on button the steps of pageload events are skipped....what shoule i do for that?

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by @sansan
0

Check for Page PostBack

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
        Session("id") = Session("id")
        Dim userName As String = User.Identity.Name

        Dim usr As MembershipUser = Membership.GetUser(userName)
        'Email.Text = usr.Email
        Email.Text = usr.Email
        ConfirmEmail.Text = usr.Email
        MsgBox("jhjkh")
End If
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.