PDA

Click to See Complete Forum and Search --> : update an object without refreshing the page?


ProgrammerJon
Jan 26th, 2004, 09:29 PM
can you update an object (like a textbox) without refreshing the whole page?

MrNorth
Jan 27th, 2004, 03:05 PM
If you mean a refresh as in a postback to the server, then you have to use client javascript to do it... remember that textboxes are server controls... they require a postback to change state...

I am not 100 on this (clock is ticking late...) but for manipulating form objects on the client alone, javascript is the way to go...

unless there is some cool asp.net feature Im forgetting... :bigyello:

Remember that the controls have a viewstate... and that they doesn't "forget" their value even if you refresh the page.. in classic asp you needed crazy stuff like manual hidden variables...

The classic example of demonstrating viewstate is a "wizard like" web abb.. you fill some values in a form, press the next button, you jump to a new page... and if you then press "back" you will see your prevoius form because the controls haven't lost their viewstate...

I suggest www.asp.net for some great asp.net tutorials...

kind regards
Henrik

ProgrammerJon
Jan 27th, 2004, 06:02 PM
thanks

KingSatan
Apr 2nd, 2007, 03:01 PM
can you give an example of a manual post back?

Coool
Apr 5th, 2007, 12:04 AM
<a href=# onlclick="__doPostBack('<anyButtonThatMakePagePostBack>','')">Manual PostBack</a>