473,404 Members | 2,137 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,404 software developers and data experts.

Disabling postback repopulation of controls


How do I disable postback repopulation of non-viewstate controls, such as
normal textboxes etc? (Surely there must be a more elegant solution than
manually clearing them on page load...)
Nov 19 '05 #1
5 1297
Are you aware of IsPostBack property?

Eliyahu

"Por Belmstedt" <po***********@framfab.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...

How do I disable postback repopulation of non-viewstate controls, such as
normal textboxes etc? (Surely there must be a more elegant solution than
manually clearing them on page load...)

Nov 19 '05 #2
set enableviewstate to false
"Por Belmstedt" <po***********@framfab.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...

How do I disable postback repopulation of non-viewstate controls, such as
normal textboxes etc? (Surely there must be a more elegant solution than
manually clearing them on page load...)

Nov 19 '05 #3

Yes, but how does that help me? The control that is repopulated on postback
is an

<asp:TextBox Runat=server></asp:TextBox>
"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:OK****************@TK2MSFTNGP14.phx.gbl...
Are you aware of IsPostBack property?

Eliyahu

"Por Belmstedt" <po***********@framfab.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...

How do I disable postback repopulation of non-viewstate controls, such as normal textboxes etc? (Surely there must be a more elegant solution than manually clearing them on page load...)


Nov 19 '05 #4

How, do you mean, is this viewstate related? The control that is
repopulated on postback is an

<asp:TextBox Runat=server></asp:TextBox>
"Martin" <ma************@martinz.co.nz> wrote in message
news:OK*************@TK2MSFTNGP15.phx.gbl...
set enableviewstate to false
"Por Belmstedt" <po***********@framfab.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...

How do I disable postback repopulation of non-viewstate controls, such as normal textboxes etc? (Surely there must be a more elegant solution than manually clearing them on page load...)


Nov 19 '05 #5
In code :
Response.Cache.SetCacheability(HttpCacheability.No Cache)

Someone recently reported doing this globally, for all pages, by modifying
the global.asax.cs file, adding SetCacheability(HttpCacheability.NoCache)
in the Application_BeginRequest event.

Per page :
<%@ OutputCache Location="None" %>

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Por Belmstedt" <po***********@framfab.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...

Yes, but how does that help me? The control that is repopulated on postback
is an

<asp:TextBox Runat=server></asp:TextBox>
"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:OK****************@TK2MSFTNGP14.phx.gbl...
Are you aware of IsPostBack property?

Eliyahu

"Por Belmstedt" <po***********@framfab.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
>
> How do I disable postback repopulation of non-viewstate controls, such as > normal textboxes etc? (Surely there must be a more elegant solution than > manually clearing them on page load...)
>
>



Nov 19 '05 #6

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

Similar topics

3
by: Jo | last post by:
Hi I've got a .NET web application and once a user presses a certain button the the page I'd like to disable other buttons straight away so that the user can't press anything else while...
1
by: john | last post by:
I have two different problems: 1. When the user has clicked on a button that is causing the browser to post back to the server, it could take a little while for the new page to show up. So in...
10
by: Krista Lemieux | last post by:
I'm new to ASP.NET and I'm not use to the way things are handled with this technology. I've been told that when I have a control, I should only bind the data to it once, and not on each post back...
4
by: Dan =o\) | last post by:
Hi guys, in the scenario where a user fills in a form, and clicks on a button to Save, there's a period of waiting (the slower the connection between client and server, the longer the delay)...
1
by: seven | last post by:
I'm playing with page inheritence but I am currently stumped by postback, on a page derived from a base class. In my base page/class I have defined an HTMLForm object. It is instantiated and...
6
by: sonic | last post by:
Hi, I am experimenting with different viewstate management ideas for large datagrids, and found a microsoft suggestion to turn it off, and only store relevant information by manually accessing...
2
by: Luis Ferrao | last post by:
Hi, I've had the opportunity to witness an very strange thing during the LoadPostData() of one of my forms. The problem is that only some of the fields in the form are filled with the...
3
by: ChrisN | last post by:
Invoking a postback before a large ASP.NET page has fully rendered will often cause the page to crash. This is unhelpful and confusing to users. I'm wondering if I can overcome this by...
2
by: John Kotuby | last post by:
Hi guys, I am converting a rather complicated database driven Web application from classic ASP to ASP.NET 2.0 using VB 2005 as the programming language. The original ASP application works quite...
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: 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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.