views:

34

answers:

2

What happens to the controls or the iframe or the div, which are hidden? Do they get transferred to the user side?

Disabled: does it get transferred to the user side?

What I want is,

an aspx page will be having many iframes to display different pages. There will be many div tags to display CSS formatted information.

To understand what I mean by many:- I have to transfer a complete website with 30 aspx pages into one single page!

I have simply combined everything resulting in one extremely huge page.

My concern is that on local host it loads fast, but when on online server accessed by numerous people for education purposes, the site (ONE PAGE) WILL SLOW DOWN terribly.

To overcome this I thought of using hidden and disable options.

What is an improved way of achieving the above?

Yes, it sounds silly but this is the requirement.

Edit: Yes, I know id and server tag must be set, but what I am asking will the div tag be sent to the user's browser? One answer is no.

So can I enable them using JavaScript?

Like

document.getElementById(id).style.visibility="visible"


What if I disable them, and from coding of JavaScript enable them? Will they be loaded at the time of enabling?

A: 

Yes, they will be transferred if you hide them with CSS styles only.

Turn your iframe and your div container into a server control by adding an ID and the runat=server attribute. Then you can programmatically set the .Visible property to false which prevents the containers to the rendered into the DOM and therefore to be sent to the client.

citronas
ur answer is it willnot be sent to user side then it meanwhen its made visible a postback will occur.can i 'visible it' using javascript likedocument.getElementById(id).style.visibility="true"
No you can client-side make it visible, because it won't be send to the client. How about using UpdatePanels to minize overhead produced by postbacks?
citronas
okay, thanks would you please also tell what happens what happens when a control is disabled=true? does it get rendered onto the client side?
As far as I know it gets rendered
citronas
A: 

Use ASP.NET panels. They render out as divs when visible. If they are set to visible = false the HTML and .NET controls inside them are not rendered to the browser.

Ben Robinson