You can define your G_Index in your global.asax Application_Start event, add it to the Application bucket, and all instances of your application will share that integer value.

Code:
'this is Global.asax.vb
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
Application.Add("G_Index", 1)
End Sub


'this is your page
'something like below
Dim r as Integer = Convert.ToInt32(Application("G_Index"))
You can then use that variable or increment anywhere.