Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Application.Get not working

Status
Not open for further replies.

drkestrel

MIS
Sep 25, 2000
439
GB
I put some 'constants' in the Application object. 99.99% of the time, I have no problems in retrieving them using
Code:
Application.Get
in ASPX pages, but there are a few instances when the Get returns null (when it shouldn't do).

FYI, items were put into Application object as follows:
Code:
'global.asax.vb:
Imports System.Web
Imports System.Web.SessionState

Public Class Global
	Inherits System.Web.HttpApplication


	Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
		' Fires when the application is started

             Application.Add("key", "Value being a String")
	End Sub
End Class

The values were obtained using:
Code:
Within an ASPX page in embedded JavaScript, embedded as:
var CONST;
function window.onload() 
{
    CONST = <%= Application.Get(&quot;key&quot;)%>;
}

CONST is null in one or two instances, but when the ASPX page reloads, it works again.

Using ASP.NET on IIS5.0 on Windows Server 2000.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top