473,401 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

Clear all fields on a screen

Is there a way to tell a screen on Postback to clear all the objects (or put
them back to their defaults on Postback)?

At the moment, I am just going through and setting them manually before
reading new records.

Thanks,

Tom
Nov 19 '05 #1
2 2098
you could just server.Transfer or response.redirect to the same page, that
would set everything back to the defaults.
HTH

cheers

Martin.

"tshad" <ts**********@ftsolutions.com> wrote in message
news:ej**************@TK2MSFTNGP15.phx.gbl...
Is there a way to tell a screen on Postback to clear all the objects (or
put them back to their defaults on Postback)?

At the moment, I am just going through and setting them manually before
reading new records.

Thanks,

Tom

Nov 19 '05 #2
"Martin" <ma*******************@martinz.co.nz> wrote in message
news:e$**************@TK2MSFTNGP14.phx.gbl...
you could just server.Transfer or response.redirect to the same page, that
would set everything back to the defaults.
That is actually a good idea since I am going to PostBack anyway to clear
the fields and I wouldn't be sending back the data that is in the viewstate
tag.

The reason I would typically do this is because the use has selected a new
record and I am repopulating the screen, so I could pass his choice to the
redirection.

The only thing would be that I would then need to re-read the data in a
couple of dropdowns when I did this, but that is probably outweighed by the
viewstate.

Thanks,

Tom

HTH

cheers

Martin.

"tshad" <ts**********@ftsolutions.com> wrote in message
news:ej**************@TK2MSFTNGP15.phx.gbl...
Is there a way to tell a screen on Postback to clear all the objects (or
put them back to their defaults on Postback)?

At the moment, I am just going through and setting them manually before
reading new records.

Thanks,

Tom


Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Dave | last post by:
Hi, I have done some research, trying to Clear The Screen in java code. The first option was the obv: system.out.print("\n\n\n\n\n\n\n\n\n\n\n\n"); then i heard about this method:...
6
by: jcollins | last post by:
Is there a command in Python to clear the screen? That is without writing multiple blank lines. Thanks. Jim C
18
by: Tim Mierzejewski | last post by:
How do I clear the text from my screen, other than a bunch of \n's or endl's? Tim M.
6
by: KL | last post by:
I was thinking...not always a good thing...is there a way to clear your screen. Like my current program asks a question and then posts 6 possible answers to choose from. Once a valid answer is...
20
by: ritchie | last post by:
Hi, I am trying to clear the screen in my program. I am loking for something that will work on all compilers, especially Borland & MS Visual Studio 6. On Visual studio I used 'system("cls");'...
22
by: mp | last post by:
i have a python program which attempts to call 'cls' but fails: sh: line 1: cls: command not found i tried creating an alias from cls to clear in .profile, .cshrc, and /etc/profile, but none...
2
by: nickyeng | last post by:
i have a function that clear the screen and then display array to cout. i compiled no error no warning, i run it, the screen really get "clear" but it does not display anything to cout, and it...
1
by: micross | last post by:
I have a simple struts applications. when I submit the form it inserts into the table and go back to the input screen. I want the html fields to be cleared. They still contain the values that i...
1
by: micross | last post by:
I have a simple struts applications. when I submit the form it inserts into the table and go back to the input screen. I want the html fields to be cleared. They still contain the values that i...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.