473,395 Members | 1,595 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,395 software developers and data experts.

HowTo clear all ViewState from a WebUserControl without doing a PostBack ?

Hello,
how can I clear all ViewStates from a WebUserControl without
doing a PostBack ?

Thanks in advance,
Andreas
Nov 17 '05 #1
3 4976
You can't. ViewState is handled on the server, not on the client.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
The more I learn, the less I know.

"Andreas Klemt" <ak******@hotmail.com> wrote in message
news:eF*************@TK2MSFTNGP09.phx.gbl...
Hello,
how can I clear all ViewStates from a WebUserControl without
doing a PostBack ?

Thanks in advance,
Andreas

Nov 17 '05 #2
Hello Kevin,
should I use control.clear? Is there a way to clear any viewstate from
textboxes?

Regards,
Andreas
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> schrieb im Newsbeitrag
news:On**************@tk2msftngp13.phx.gbl...
You can't. ViewState is handled on the server, not on the client.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
http://www.takempis.com
The more I learn, the less I know.

"Andreas Klemt" <ak******@hotmail.com> wrote in message
news:eF*************@TK2MSFTNGP09.phx.gbl...
Hello,
how can I clear all ViewStates from a WebUserControl without
doing a PostBack ?

Thanks in advance,
Andreas


Nov 17 '05 #3
Hi,
You can set that textbox won't get any viewstate by setting
enableviewstate property to false. this can be done only on the server
side.

Natty Gur, CTO
Dao2Com Ltd.
34th Elkalay st. Raanana
Israel , 43000
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #4

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

Similar topics

5
by: Christian | last post by:
Hi, Viewstate of WebUserControl does NOT work although the 'EnableViewstate'-property of the usercontrol is set to true Description : Using ASP.Net : I have a created a WebPage with 2...
2
by: Christian | last post by:
Hi, Viewstate of WebUserControl does NOT work although the 'EnableViewstate'-property of the usercontrol is set to true Description : Using ASP.Net : I have a created a WebPage with 2...
6
by: Robin Bonin | last post by:
In my user contol I am creating a set of dropdownlists. Each list is created based on input from the other lists. The problem I am having is setting the selected index on the lists. If someone...
10
by: Calvin X | last post by:
Hi all I have the following code in the page load event. The function in this code works get to populate the 4 dropdownlists on my webform. I have enabled postback because when the user selects...
7
by: et | last post by:
I'm not sure I understand the use of the ViewState. Do I understand correctly that values of controls are automatically held in a hidden control called ViewState? If so, then why can't we get...
1
by: olduncleamos | last post by:
Hello all, I am experimenting with the repeater control and ran into something that I wasn't expecting. I would appreciate if the experts can confirm or correct my understanding. Here is a...
11
by: Nad | last post by:
Hello, I have a page with two link buttons. When I click on the first one I call server.execute("target.aspx") to view target.aspx on the original page. Then I click on the second link button...
1
by: batista | last post by:
Hello, I have a web page, which is being refresh after every 30 secs.Now, there is also a datagrid in it, which i bind in the pageload event. Now the problem is when the page is refresh after...
0
by: bminder | last post by:
I have a web user control that contains a serializable class. I persist this class in viewstate, but on postback, the viewstate is null. Is this behavior by design? This technique works fine on...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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.