Asha,
You ask an interesting (as in odd) question. First off, if this is for a
particular page, why not place it in this page, instead of the Application?
Also, why do you have code that does infinite loop? is this a bug or by
design? I think you might be trying to solve your problem the wrong way.
However, without knowing more about your problem, I might try something like
this:
Global.asax:
Sub Application_Beg inRequest(ByVal sender As Object, ByVal e As
EventArgs)
Dim path As String = Request.Url.Abs olutePath
If path.ToUpper() = "/PATH/PAGE.ASPX" Then
Context.Items.A dd("maxLoop",
System.Configur ation.Configura tionSettings.Ap pSettings("maxL oop"))
End If
End Sub
your page:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
dim maxLoop as integer = cint(Context.It em("maxLoop"))
End Sub
Again, not sure why you want to use global.asax for this and not do the
logic in the page, and also not sure this is even the right way to solve
your problem.
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"Asha" <As**@discussio ns.microsoft.co m> wrote in message
news:AE******** *************** ***********@mic rosoft.com...
i want to keep a global variable or a session in global.ascx when ever a
user access this particular page. at certain time, this page will do a infinit
loop, and i want to set a variable to allow it to only loop how many times
i want. e.g 3 times and quit. how can i get this done?