Post back in a part of a web page not all the page

A

Ahmed Hashem

Hi All;
I hope that you can help me in replying to my question. I have a web form
that have many post backs to get data from the web server. Every time I use
one of those post backs all the page is posted back to the server(This is
not almost welcomes by the user). I want only the part only to be refreshed
or posted back(assuming that we put it in something like panel).
I heared that I can use the <div> tage to fix this problem. I tried it but
not working. If so is there any alternatives.
I hope that you can kindly answer my question.
Best Regards;
Hashem
 
S

S. Justin Gengo

Hashem,

You could use iFrames. But they are IE compatible only.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
 
A

Alvin Bruney

Don't know where you got that div tag thing from. About the only thing you
can do is either use an iFrame, which doesn't really solve the problem but
puts a bandaid over it, or you can try turning on smart navigation which is
supposed to refresh only the changed items on the screen. Even this works
marginal for applications and it introduces a whole slew of other unwanted
buggy 'features'.

I'd recommend that you just get smart about roundtripping data. For
instance, if you would cache some common data (stuff contained in dropdown
lists for example) on one postback and bind it to controls then these
controls would not have to post back to get that data as they would already
be there - simple stuff like that makes for a pleasant user experience.

Also, I don't think users really mind the postback if it is quick and there
is not much delay. Users get pissed when it takes 5 seconds or more to make
different selections in a drop down for example and with good reason. Get
clever about viewstate, use server controls only when absolutely needed and
cache data whenever possible using the four levels of caching provided by
ASP.NET. Together, all of these improve the user experience, which is what
counts anyway. It's easy to build a web application, it's difficult to
master the skill of building a good web application.
 
J

James Radke

Ahmed,

What I have done to solve that very problem is to enhance my ASPX page with
client side javascript. The client-side javascript calls a webservice
function contained within my web/intranet site which retrieves the necessary
data from the server, and then the javascript modifies the required
client-side fields appropriately. This works fine for me in almost every
instance. The only downside is that I cannot re-do a datagrid in this
manner - that has to remain as a postback event.

I have even taken to performing some client-side validation this way to
eliminate the round-tripping / passing of data when the page contains a lot
of information. This really makes the user experience much better as it
eliminates the 'flicker' of the page while it refreshes, and makes the
backgound commands execute faster.

A great article that I used as the basis for my code can be found at:

http://www.fawcette.com/vsm/2002_06/online/delcogliano/default_pf.aspx

If you have any questions, let me know!

Thanks!

Jim
 

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,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top