views:

17

answers:

0

I have a activeindex naviagtion error, while i navigate pages using the next button.

This issue is happening, when user goes to the last page again come to the front using back button and go the last page using “next “button. (Multiple iterations causing this issue)

Website is acting strange. It gives following flow..

Page1-->page2-->Page3-->Page4 instead of Page1-->page2-->Page4

Protected Sub btn_View0_Next_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btn_View0_Next.Click, btn_View1_Next.Click, btn_view2_Next.Click

Try
    Dim currentView As Int16
    currentView = mvRequestorForm.ActiveViewIndex
    If currentView = 1 And BSelected = 1 Then
        mvRequestorForm.ActiveViewIndex = (currentView + 2)
        rfv_view2_managersEmail.Enabled = True
        rev_view2_managersEmail.Enabled = True
    Else
        mvRequestorForm.ActiveViewIndex = (currentView + 1)
    End If

    If mvRequestorForm.ActiveViewIndex = 1 Then
        Sub_ActivateView1()
    End If

Catch ex As Exception

End Try

End Sub

I need suggestions to rectify or prevent this error.