simple global variables and routines

W

Web Search Store

Hello,

Is there a place I can put a class of global variables and have them
available in the page_load routine?

Here is a class:

Public Class globalvar

Public ddd As String = "howdy"

Public sub writeit

response.write ddd

end sub



End Class


In the page_load I would access them like this:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load

ddd="goodbye"

writeit()
End Sub



This seems a hard thing to do in asp.net



I can put them all in a user control, and put an instance of it on each
page, if I have to.



Thanks for your help.



Scott
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top