How can I make a variable accessible outside of a data block? In this case it is in a While Loop. I am using VB.<BR><BR>Thankslike a Global variable ?<BR><BR>ex.:<BR><BR><% @Page language="vb" runat="server"%><BR><BR><script runat="server"><BR><BR>Dim MyGlobalVariable as Integer<BR>MyGlobalVariable = 1<BR><BR>Sub Page__Load()<BR>...whatever code you have...<BR>...whatever code you have...<BR>...whatever code you have...<BR>If MyGlobalVariable = 1 Then<BR>....<BR>Else<BR>....<BR>End If<BR>End Sub<BR><BR><BR>'Button click event<BR>Sub MyClickEvent(Sender as Object, E as EventArgs)<BR>...whatever code you have...<BR>...whatever code you have...<BR>...whatever code you have...<BR>If MyGlobalVariable = 1 Then<BR>....<BR>Else<BR>....<BR>End If<BR>End Sub<BR><BR></script><BR><BR><html><BR><body><BR><BR><form runat="server"><BR><BR><asp:button id="btnButton" text="Submit" onclick="MyClickEvent" runat="server"/><BR><BR></form><BR><BR></body><BR></html><BR><BR>'The variable "MyGlobalVariable" is a global, it can be used in the Page_Load() subroutine just as much as in the MyClickEvent() subroutine.Thanks.