Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Problem accessing controls in hidden panel

Reply
Thread Tools

Problem accessing controls in hidden panel

 
 
Kevin Le
Guest
Posts: n/a
 
      09-08-2003


Hi all,

I have problem accessing controls in a hidden panel.

I have Control1 in Panel1. If Panel1 visible="true" then I can get
value from Control1.text but if my Panel1 visible = "false" then my
Control1.text return null.

Does it require some special way to access controls in hidden panel or
is it possible to access child controls of hidden panel at all? Please
help.

Thanks,
Kevin

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
Sebastian Doroftei
Guest
Posts: n/a
 
      09-08-2003


Since the Panel is not visible, the Server does not send it to the
browser. You can check this by viewing the source of the page loaded in
the browser. Since your control is embedded in this Panel, and the Panel
is not written in the Response object by the server, it's obvious that
the control is not written either, so it's null.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
Kevin Le
Guest
Posts: n/a
 
      09-09-2003
Sebastian,

Thanks for your reply!

If I want to have a group hidden controls, for example:

<input type="hidden" name="Control_Id" value="">

in some sort of container/panel so that I can hide them from the users
in a single visible property setting (instead of type="hidden" for each
control) but still want to be able to access their values. Is there an
easy way to do it?


Thanks,
Kevin



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
Dave
Guest
Posts: n/a
 
      09-10-2003
You could simply put them in a table which you hide by setting the style (
VISIBILITY: hidden ) instead of using a control's .Visible property. That
way it will be rendered to the browser but still hidden from view.

"Kevin Le" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Sebastian,
>
> Thanks for your reply!
>
> If I want to have a group hidden controls, for example:
>
> <input type="hidden" name="Control_Id" value="">
>
> in some sort of container/panel so that I can hide them from the users
> in a single visible property setting (instead of type="hidden" for each
> control) but still want to be able to access their values. Is there an
> easy way to do it?
>
>
> Thanks,
> Kevin
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Populate Hidden field on post back and retrieve value from Hidden Field Rick ASP .Net 3 04-13-2010 05:38 PM
Win 7 folders hidden despite 'show hidden' checked Boppy NZ Computing 10 01-23-2010 02:56 AM
Hidden Panel Problem =?Utf-8?B?am9obiBwcnlvcg==?= ASP .Net 2 08-03-2007 03:14 PM
Accessing hidden controls on ascx page krallabandi@gmail.com ASP .Net Building Controls 1 04-26-2006 10:37 PM
accessing controls in a panel rjl444@hotmail.com Java 7 01-24-2005 09:23 AM



Advertisments