Because everytime your page refreshes, the value of G_Index is set to 1 in your page_load event.
You would need to wrap it in the check condition whether page is postbacking or loading for the first time.
vb.net Code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack G_Index = 1 End If End Sub




Reply With Quote