473,811 Members | 2,485 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Textboxes clear on postback

I have an asp.net 2.0 page with a couple of textboxes and a gridview. On
postback from a rowcommand from the gridview, the textboxes are clearing out.
No other postbacks from the page are causing this. There is NO code
whatsoever that deals with these boxes. One of them is just a dummy I set up
for troubleshooting . I type something in it and cause a postback from
another control and the value is still there as it should be. Then, when a
rowcommand from the gridview causes a postback the textbox clears. Please
help. Thanks.
Aug 30 '06 #1
2 2795
lanem wrote:
I have an asp.net 2.0 page with a couple of textboxes and a gridview. On
postback from a rowcommand from the gridview, the textboxes are clearing out.
No other postbacks from the page are causing this. There is NO code
whatsoever that deals with these boxes. One of them is just a dummy I set up
for troubleshooting . I type something in it and cause a postback from
another control and the value is still there as it should be. Then, when a
rowcommand from the gridview causes a postback the textbox clears. Please
help. Thanks.
Is EnableViewState = true?
Aug 30 '06 #2
Yes, it is set to true. Remember, other postbacks do not cause the textboxes
to lose their values, only the gridview rowcommand.

"Ray Booysen" wrote:
lanem wrote:
I have an asp.net 2.0 page with a couple of textboxes and a gridview. On
postback from a rowcommand from the gridview, the textboxes are clearing out.
No other postbacks from the page are causing this. There is NO code
whatsoever that deals with these boxes. One of them is just a dummy I set up
for troubleshooting . I type something in it and cause a postback from
another control and the value is still there as it should be. Then, when a
rowcommand from the gridview causes a postback the textbox clears. Please
help. Thanks.
Is EnableViewState = true?
Aug 30 '06 #3

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

Similar topics

3
6183
by: jw56578 | last post by:
When a page does a post back and there is data in a textbox, that textbox will get automatically repopulated with that data due to the posting of the form. Disabling viewstate has no affected on textbox controls, so how do you make it so that the text box value is cleared out on postback?
2
5039
by: englishman69 | last post by:
Hello, I have been banging my head against this one for a while... Searches online have revealed many different proposals for correcting my issue but none that I can follow! My basic situation is this, I have a page which uses multiple postbacks to generate a list of dynamic text boxes with appropriate labels. However, when I do the final postback to enter the values in the dynamic textboxes into the database the values seem to become...
3
1569
by: jeroen.bolle | last post by:
I'm designing a form where the user can decide how many options for a poll he wants to add. There's a "+" button to dynamically add textboxes with javascript, without a postback. How do I access these newly generated <input type="text" id="..." /> elements with ASP.NET to save it to a database?
0
1517
by: rvdnieuwenhuizen | last post by:
Hi, The problem I cannot seem to solve: I have a page with a button control. In the On_Click eventhandler I dynamically add one TextBox each time the button is clicked. I add the textboxes to an update panel. I store the ID for the generated textboxes in the Viewstate, which I use in the Panels' INIT eventhandler to go ahead and instantiate the textboxes once again every postback. I use the, in my opinion, old mechanism of retreiving
0
9728
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9605
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10389
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10402
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9205
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7670
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5554
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3867
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3018
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.