Language Basics ASP.Net

 
    Dim Global As String ="
Hello I'm a persistent global variable"   
Sub Page_Load()  
    Response.Write (Global)     
    Response.Write ("Calling Subroutine 1...")
    Call Subroutine_1()
    Response.Write ("Calling Subroutine 2...")
    Call Subroutine_2()
    Response.Write ("Calling Subroutine 1...")
    Call Subroutine_1()
End Sub
  Sub Subroutine_1()
    Dim Different As String
    Different = "Hello I'm the variable Different in Subroutine 1"
    Response.Write (Different)
    Response.Write (Global)
  End Sub
  Sub Subroutine_2()
    Dim Different As String
    Different = "Hello I'm the variable Different in Subroutine 2"
    Response.Write (Different)
    Response.Write (Global)
  End Sub



Scope