S
Salek Talangi
Hello,
I have following (probably very basic) problem:
I made a html-frameset in VS.net, where the frames
itself are aspx-pages with webforms.
Now I want to access the webforms (eg. give a label a
text) from one .aspx.vb page.
I managed to get all the code into one file by writing
the same file in the codebehind statement of all aspx
files.
Now I have one big .aspx.vb file with:
Public Class Header
Public Class Main
There is a Label in the header.aspx and its defined
in header-class as
Public WithEvents HLabel As System.Web.UI.WebControls.Label
How do I access this Label from my Main Class? It has to
be possible, but I failed.
I tried this, but it didn't work:
Dim theHeader As Header = New Header()
theHeader.HLabel.Text = "Hello World"
This (and any try with "new") gives me the error:
"System.NullReferenceException: Object reference not set
to an instance of an object."
Any help is appreciated
Thanks in advance,
Salek
I have following (probably very basic) problem:
I made a html-frameset in VS.net, where the frames
itself are aspx-pages with webforms.
Now I want to access the webforms (eg. give a label a
text) from one .aspx.vb page.
I managed to get all the code into one file by writing
the same file in the codebehind statement of all aspx
files.
Now I have one big .aspx.vb file with:
Public Class Header
Public Class Main
There is a Label in the header.aspx and its defined
in header-class as
Public WithEvents HLabel As System.Web.UI.WebControls.Label
How do I access this Label from my Main Class? It has to
be possible, but I failed.
I tried this, but it didn't work:
Dim theHeader As Header = New Header()
theHeader.HLabel.Text = "Hello World"
This (and any try with "new") gives me the error:
"System.NullReferenceException: Object reference not set
to an instance of an object."
Any help is appreciated
Thanks in advance,
Salek