"Eliyahu Goldin" <> wrote in
message news:...
> Server controls with Visible=false don't get rendered to client. Leave
> Visible=true and hide with css rule display:none.
That worked great.
If I set the Panel display:none, will it work the same way and hide the
controls but leave them on the page?
Is there a way to set this from vb.net during processing?
I periodically set visible to false to hide a control or section of HTML
with controls on them. This is usually done by <Div id="something"
runat=false> or <asp

anel id = "something" runat=false> and then setting
something.visible=false.
This works pretty well most of the time.
But sometimes I do need to get access to the variables from Javascript - so
visible=false won't work.
So where I do something like this to hide panel in my asp.net code:
thePanel.visible = false
Is there a better way to do this so I can get access to the variables from
the panel?
How would I set style="display:none" from asp.net?
Thanks,
Tom
>
> --
> Eliyahu Goldin,
> Software Developer
> Microsoft MVP [ASP.NET]
> http://msmvps.com/blogs/egoldin
> http://usableasp.net
>
>
> "tshad" <> wrote in message
> news:...
>> How do you hide an asp.net object and still be able to access it?
>>
>> I had my email in a session variable, but you can't access the session
>> variable from Javascript (I don't think - since Javascript is Client and
>> Session is Server).
>>
>> I tried using the email that was on the page, but it was surrounded by a
>> Panel that had its visible property set to false - so anything inside of
>> the Panel was not on the page.
>>
>> I also tried to set a variable:
>>
>> <asp:Label ID="emailSave" Visible="false" runat="server"/>
>>
>> But I had the same problem as the Panel, it wasn't on the page.
>>
>> I am trying to access this from a page I open so this page is now the
>> opener.
>>
>> How can I hide a variable and still get access to it via the Javascript?
>>
>> Thanks,
>>
>> Tom
>>
>
>