Click here to Skip to main content
14,303,417 members
Rate this:
Please Sign up or sign in to vote.
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
Rate this:
Please Sign up or sign in to vote.

Solution 1

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.
   
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
Rate this:
Please Sign up or sign in to vote.

Solution 2

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
   
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.
remcovisser 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, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100