best way to dynamically alter page contents and speed

W

Wee Bubba

the lower part of my page consists of a dataList along with other
server controls and HTML markup. this is my data display section. the
upper part of my page is a data entry section.

what I want to do is give the user the option of displaying the data
below OR NOT. i.e. I am hoping that if they choose NOT to display the
data in the lower half of the page this will make their data entry
process quicker in the upper half.

what I want to do is say to the user, "If you want to do data entry
quicker then tick this checkbox to disable the data display section"
i.e. the dataList etc. will not be loaded at all so the page
postbacks will be quicker.

I am thinking I need to place my data display code inside a user
control then dynamically load this into a placeholder ONLY if the
page is in edit mode. or can i get away without using user control?

what is the best way to remove the lower half of my page dynamically
if the mode is "insert only"?

any advice much appreciated thanks.
 
D

DalePres

A placeholder is one option as is a user control, but an interesting thing I
have found is that just using an HTML Server control, (a DIV marked as
runat="server") will do the same thing.

I have a situation very similar to what you're describing where I use a
datalist to show a list of items and only when they click to edit or add a
new item do I want them to see the data entry form. The data entry form is
in a HTML Server control with visible=false and when they want to see the
data entry form, I just make visible=true.

When visible=false on the DIV, ASP.Net doesn't even render the items. I
have checked the source on the client and it's not even there.

Hope that helps,

Dale
 
W

Wee Bubba

thanks - that does help a lot. i never knew you could make the layer
tags server side either!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top