Saturday, March 24, 2012

Load content on demand or in portions

Hi,

I have large chunks of text (400-500Kb) that are loaded inside update panel when user clicks on a tree node with the book name. It works fine and all. The only thing is that the text is first downloaded to client and then shown - the user will have to wait for the whole 400Kb of text to download. Is there a way to show the first 5-10Kb of text once it has reached the client and keep loading the reast while user is reading?

And one more question - is this ok that Page_Load() event is fired every time UpdatePanel is updated?

Hi abolotnov,

To start with your last question it is normal that the page_load event get fired when you are doing a partial update. The trick is within the rendering of the HTML, so thats correct. What kind of control is inside your UpdatePanel (treeview?) You can use a updateprogress control to make clear to the user that the page is still updating. Can you past some code here so we can analyze your code. Thanks

Regards,


yeah, I know I can use UpdateProgress control to tell the user that the page is still updating... this is not I really want though -

say I have this UpdatePanel with DIV inside of it and need the text in DIV to be updated. The text is 400K - quite a lot for people with slow internet connection (dialup for example). I want them to be able to start reading the text before it's downloaded in whole. Say, if their connection speed is 4K/sec, they will be able to start reading in 1 second - 4K of text gives them enough to read before the rest is downloaded - another 4k will come next second etc.

What I have now is when the update starts use sees this message "content for reading pane is being updated, please wait" untill the whole portion of text is downloaded and then rendered. For people on slow internet connections it takes quite a while 400/4 secs.


Don't ask me why I can't split the text into smaller portions and allow users to page through the text - I will if there is no way to sort out what I want.

Thanks for any comments you may have on this.

No comments:

Post a Comment