Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code execution inside a placeholder control

Status
Not open for further replies.

Jimi2Cool

Programmer
Jul 30, 2007
25
US
i was under the impression that the controls inside a placeholder dont fire there events or execute any codebehind unless the placeholder was visible.

in my app it appears that all my controls are running weather they are in a visible placeholder or not, if they're in an invisible placeholder they just dont render their html.

Is there a way to make it to where a controls code wont execute in the placeholder if it's not visible (without putting if(Container.Visible) checks all over the place)?
 
just so i dont look even more novice

"(without putting if(Container.Visible) checks all over the place)"

I meant

"(without putting if(this.Parent.Visible) checks all over the place)"

sorry~
 
in my app it appears that all my controls are running weather they are in a visible placeholder or not, if they're in an invisible placeholder they just dont render their html.
Yes, that's correct.

"(without putting if(this.Parent.Visible) checks all over the place)"
You have to either do this or create a function to remove all the relevant event handlers in the page load event.



-------------------------------------------------------

Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]
[URL unfurl="true"]http://mdssolutions.co.uk[/url] - Delivering professional ASP.NET solutions
[URL unfurl="true"]http://weblogs.asp.net/marksmith[/url]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top