Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
when i hide the div using div ID.visible=false but i have a little doubt after the code runs the div content is loaded or not
Posted
Updated 12-Jul-12 2:32am
v2

It is not loaded. You'll have to set style visibility so that it will be sent to the client. Anything in .Net that you set as Visible = false is not actually sent to the client at all so you cannot get to it in JS.
 
Share this answer
 
Comments
saravana__ 12-Jul-12 8:34am    
Please explain this
ZurdoDev 12-Jul-12 8:47am    
Well, your question is not at all clear. However, I am saying that if you set Visible = false in C# or in the ASPX code that control will not be sent to the client.
saravana__ 12-Jul-12 8:53am    
but someone says the div contents are loaded....
Now i explain my doubt
I am using one web user control inside the div....if the current page is 1 then the div is visible to user otherwise visible false
ZurdoDev 12-Jul-12 8:55am    
I still don't fully understand what you are asking.
saravana__ 12-Jul-12 8:35am    
inside the div i am using web user control
Hi,

That will be loaded in the memory but HTML for that div will not be rendered in the "view source".
Have a look at the discussions here[^].

--Amit
 
Share this answer
 
Comments
saravana__ 12-Jul-12 8:39am    
Thank You
saravana__ 12-Jul-12 8:40am    
Pls explain this concept
_Amy 12-Jul-12 8:57am    
If you are setting visible=false for any server controls, means it will load the required data but the html for that control will not be rendered.
Remco Visser 12-Jul-12 9:32am    
If you want the div to be present in the html but not visible on the page you should consider using the display property of the styling (style="display:none" or style="display:block;"). That way you can switch visibility with javascript.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900