473,654 Members | 3,096 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Retaining values in ASP.Net webform.

Hello all -

I can't seem to find what could be causing this issue so I wanted to appeal to the .NET gurus out there. When I have users input values into Page 1 and submit it, I want the ability so that the user can navigate back from Page 2 (through clicking the "Back" button) and the values they just put in (text boxes) or selected (listboxes) are retained. Right now, though, the page is completely cleaned to blank and the user ends up having to re-input the data. Is there a property that I'm not aware of in .NET that retains values. A few people and research has suggested something about AutoNavigation property set to true but wasn't sure if it was related

Thanks
Mark
Nov 18 '05 #1
2 1540
Hi,

this would need keeping the values on Session, database or by utilizing
custom ViewState restoring that occurs after redirect (normally is cleared
as you saw). This article tells about the ViewState restoring:

ViewState: Restore after Redirect
http://authors.aspalliance.com/PaulW...rticles/?id=10

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist

"Mark" <an*******@disc ussions.microso ft.com> wrote in message
news:50******** *************** ***********@mic rosoft.com...
Hello all -

I can't seem to find what could be causing this issue so I wanted to appeal
to the .NET gurus out there. When I have users input values into Page 1 and
submit it, I want the ability so that the user can navigate back from Page 2
(through clicking the "Back" button) and the values they just put in (text
boxes) or selected (listboxes) are retained. Right now, though, the page is
completely cleaned to blank and the user ends up having to re-input the
data. Is there a property that I'm not aware of in .NET that retains
values. A few people and research has suggested something about
AutoNavigation property set to true but wasn't sure if it was related.

Thanks,
Mark
Nov 18 '05 #2
Teemu

I appreciate your response. I should added this to my original but what makes this perplexing is that even though the example makes sense, I have other pages I created where when I do hit the 'Back' button, the data is retained yet the code is nearly identical from what I can see between ones that do and ones that don't retain values in their pages. I don't have ViewState anywhere set in the pages that do retain the values as well

Any ideas from anyone are appreciated at this point

Thanks
Mar

----- Teemu Keiski wrote: ----

Hi

this would need keeping the values on Session, database or by utilizing
custom ViewState restoring that occurs after redirect (normally is cleared
as you saw). This article tells about the ViewState restoring

ViewState: Restore after Redirec
http://authors.aspalliance.com/PaulW...Articles/?id=1

--
Teemu Keisk
MCP, Microsoft MVP (ASP.NET), AspInsiders membe
ASP.NET Forum Moderator, AspAlliance Columnis

"Mark" <an*******@disc ussions.microso ft.com> wrote in message
news:50******** *************** ***********@mic rosoft.com..
Hello all

I can't seem to find what could be causing this issue so I wanted to appeal
to the .NET gurus out there. When I have users input values into Page 1 and
submit it, I want the ability so that the user can navigate back from Page 2
(through clicking the "Back" button) and the values they just put in (text
boxes) or selected (listboxes) are retained. Right now, though, the page is
completely cleaned to blank and the user ends up having to re-input the
data. Is there a property that I'm not aware of in .NET that retains
values. A few people and research has suggested something about
AutoNavigation property set to true but wasn't sure if it was related

Thanks
Mark

Nov 18 '05 #3

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

Similar topics

19
4125
by: jeff | last post by:
how do you convert form byte to Int32 while retaining the binary value of the byte array
0
1353
by: Earl Teigrob | last post by:
I have a page that reads values from an XML file to display to the user. The page also has a control panel that allows administrators to update the XML file with new values. When an administrator presses the update button in the control panel area of the page and the values are written to the XML file, I want the page to reload with the new values WHILE RETAINING ANY VIEW STATE VALUES. (that are not rewriten by the new XML values) I have...
3
1265
by: Netserver | last post by:
Hi have a question hope there is a simple answer. I want to enter data in to 2 arrays from several webforms in project and be able to recall that data from any of the webforms, other then using a querystring I tried creating a module as follows Module dataspecs Public ar1(0) As Integer Public ar2(0) As Integer End Module
2
1387
by: cFleury | last post by:
This system works in a intranet w/ some 200 stations and this particular form is retaining its values among different stations...like if I enter some values in the form on station 1 walk to station 2 and call the form the fields will be field w/the same info.... What can I do ? Thanks C.Fleury
2
1185
by: cFleury | last post by:
The forms in my application are retaining the values objects have (text box, datagrid, public vars, etc…) among different computers in the network, for example if you as result of entering a name in a text box have a datagrid listing matches from a database’s table, and then walk to another computer and go to the same system option which should display a screen with empty fields at startup, it will be showing the same data in the...
5
11891
by: jung_h_park | last post by:
From: jung_h_park@yahoo.com Newsgroups: microsoft.public.dotnet.framework.aspnet Subject: Dropdown List not retaining its SelectedValue Date: Mon, 26 Jun 2006 21:02:57 -0700 Hello, My dropdown list control does not retain its SelectedValue. Unless I read the SelectedValue right after the control has been loaded, populated, and assigned with its original value (and of course that is
4
1594
by: RipperT | last post by:
College newbie here (Instructor MIA). I have instructions to pass variable values from one web page to another like this (VS2005): 1. Declare and create the properties on the first page (source form): Public ReadOnly Property UserName() As String Get Return userNameTextBox.Text End Get End Property 2. Call the next page by calling the Transfer method of the Server object:
3
9840
by: =?Utf-8?B?ZGVuIDIwMDU=?= | last post by:
Hi, Trouble in retaining values of dropdownlist, textboxes, and other controls when dropdownlist selectedindexchanged event is triggered, the controls are inside a user control and this user control inside a parent user control with an update panel. Can you guys help me hwo to retain the values. I have set EnableViewState to true. Where is correct page event to store entered and selected values before the values on controls are...
0
970
JAMBAI
by: JAMBAI | last post by:
I have created a ASP.NET application and created two forms (Webform1.aspx & Webform2.aspx). I am displaying the Webform2.aspx based on the Webform1.aspx input, For example if the user didn't fill some field in Webform1.aspx then I am showing the Webform2.aspx as a alert message, and I am opening this Webform2.aspx using window.open From the Webform2.aspx the user may go back to the Webform1.aspx and fill the values or he may submitting...
0
8376
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
8290
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,...
1
8489
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
8594
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7307
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
6161
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
5622
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4294
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2716
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.