web application don't work this way. a form class instance only exists
during the processing of that form, thus you can not set properties on
another form, as it does not exist. this where the stateless nature of web
processing must be handled. you can set a flag in session that the other
page checks to set the visibility.
in your example you created a new instance of WebForm2, but did not call the
processing routines (oninit, onload, etc...) and setup the html output
stream, so none of its sub controls are created. even if you call the
processing routines and set the property, it will have no impact on a later
page request.
-- bruce
"Big Charles" <ch**********@yahoo.comwrote in message
news:11*********************@i3g2000cwc.googlegrou ps.com...
Hello Gurus,
At WebForm2, I am trying to set visible property of control panel
"Panel01" on WebForm1 to False. But I get error like "Instance not
referenced"
At WebForm2:
Dim wform As New WebForm2
wform.FindControl("Panel01").Visible = False
What is missing?