A
Adam Knight
Hi all,
I am still unable get retrieve an Application variable in .NET.
I can use the Session object by just typing.. Session("myVar") in aspx or
..vb.
However, using Application("myVar") results in nothing.
I have tried executing the following code..but nothing is outputted.
If Application("UrlPrefix") Is Nothing Then
Response.Write("<NULL>")
Else
Response.Write("Type: " & Application("UrlPrefix").GetType().Name & ",
Value: """ + Application("UrlPrefix").ToString() + """")
End If
If i include this code.. 'Response.Write(Application.Keys.Count) i get 0
So either the application object is not being created ..or it needs to be
referenced some how..
Am i missing something here?
The code is contained in a .vb file used for a user control.
These are the imports i am using, in case they are relevant.
Imports Microsoft.VisualBasic
Imports System
Imports System.Configuration
Imports System.Data
Imports System.Data.SqlClient
Imports System.Web.UI
Imports System.Web.UI.WebControls
Would appreciate any help to get beyond this.!!!
Cheers,
Adam
I am still unable get retrieve an Application variable in .NET.
I can use the Session object by just typing.. Session("myVar") in aspx or
..vb.
However, using Application("myVar") results in nothing.
I have tried executing the following code..but nothing is outputted.
If Application("UrlPrefix") Is Nothing Then
Response.Write("<NULL>")
Else
Response.Write("Type: " & Application("UrlPrefix").GetType().Name & ",
Value: """ + Application("UrlPrefix").ToString() + """")
End If
If i include this code.. 'Response.Write(Application.Keys.Count) i get 0
So either the application object is not being created ..or it needs to be
referenced some how..
Am i missing something here?
The code is contained in a .vb file used for a user control.
These are the imports i am using, in case they are relevant.
Imports Microsoft.VisualBasic
Imports System
Imports System.Configuration
Imports System.Data
Imports System.Data.SqlClient
Imports System.Web.UI
Imports System.Web.UI.WebControls
Would appreciate any help to get beyond this.!!!
Cheers,
Adam