473,769 Members | 1,683 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Persisting form data across page load

A common problem in database updates in the maintenece of "domain
tables". For example, a product database has an option for color. When
entering the specifications for a new product, a domain table is used
to populate a drop down list of available colors.

Simple so far. But what if the user wants to create a new color
specification on the fly? Let's say that this is a complicated process
requiring it's own page with validation code. Once the process is
complete, the user needs to be redirected back to the half completed
form so he can finish.

What is the best way to persist all of the data that the customer has
entered before? One option is to place the results of each control
into a session variable, and then write code to put it all back into
place, but that's kind of sloppy, and I could have done that in
classic ASP.

Is there some magic .net solution to persisting a form across page
loads?
Nov 18 '05 #1
2 2799
John,
No, there is not a "magic" .Net solution for this. You need to save
temporary information, and Session is one of the options to do this.
Actually, since you need information on two different pages, session is
probably the best option.

Best regards,
Jeffrey Palermo

"John Hoge" <jh******@yahoo .com> wrote in message
news:d0******** *************** ***@posting.goo gle.com...
A common problem in database updates in the maintenece of "domain
tables". For example, a product database has an option for color. When
entering the specifications for a new product, a domain table is used
to populate a drop down list of available colors.

Simple so far. But what if the user wants to create a new color
specification on the fly? Let's say that this is a complicated process
requiring it's own page with validation code. Once the process is
complete, the user needs to be redirected back to the half completed
form so he can finish.

What is the best way to persist all of the data that the customer has
entered before? One option is to place the results of each control
into a session variable, and then write code to put it all back into
place, but that's kind of sloppy, and I could have done that in
classic ASP.

Is there some magic .net solution to persisting a form across page
loads?

Nov 18 '05 #2
Hi,
You can open the second form as dialog box using client-side java script.
You will not lose your session when you close the dialog.
Krishna Jammula

"John Hoge" wrote:
A common problem in database updates in the maintenece of "domain
tables". For example, a product database has an option for color. When
entering the specifications for a new product, a domain table is used
to populate a drop down list of available colors.

Simple so far. But what if the user wants to create a new color
specification on the fly? Let's say that this is a complicated process
requiring it's own page with validation code. Once the process is
complete, the user needs to be redirected back to the half completed
form so he can finish.

What is the best way to persist all of the data that the customer has
entered before? One option is to place the results of each control
into a session variable, and then write code to put it all back into
place, but that's kind of sloppy, and I could have done that in
classic ASP.

Is there some magic .net solution to persisting a form across page
loads?

Nov 18 '05 #3

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

Similar topics

5
2135
by: James Baker | last post by:
I have a form that has a dropdown list that will cause a post to the same page when it's changed. The problem I'm running into is that all of the controls reset to their default values (obviously expected behavior). What's the recommended/best way to persist these values through the post process? I know I could set them to the request.form values of themselves, so to speak...but I didn't know if there was a simpler/more efficient way. ...
2
3089
by: Citoyen du Monde | last post by:
Trying to get some ideas on a simple javascript project (to teach myself the language). I want to develop a client-side vocabulary practice application that would allow users to enter their own words, their own definitions plus an example of how the word is used in practice. It'll be all client side with - cookies? to get persistence so that the words won't disappear on me each time the page is closed (which is what happened when I
8
1827
by: John Smith Jr. | last post by:
I am looking for some way to persist a table web control so when page_load event comes up, i can display the table as it was. I tried using ViewState with the rows collection but that didn't work to well as I got an error trying to put rows collection in the viewstate. My problem is this: I load a table with rows and controls, then wire events, this is after clearing the rows of the table initially in this function.
1
1669
by: lim | last post by:
What is the possible error that occurs when the Page_load event is not triggered during execution. In my page there's some basic server control. Is there any loops holes?
1
1606
by: Shawn McNiven | last post by:
Hi, I've got a problem I hope someone can help me with. First some long winded explanations: I have several forms: Countries.aspx, Country.aspx, Cities.aspx and City.aspx. Countries displays a list of countries which can be filtered with a search function. Country displays the selected record from Countries. From Country, the user can select the "View Cities" button which transfers them to the Cities page (in this case a listing of...
3
2270
by: Stu | last post by:
Hi, I am creating a control in a PlaceHolder like so: Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click Dim ctrl As AcceptOrCancel = CType(Page.LoadControl("controls/AcceptOrCancel.ascx"), AcceptOrCancel) PlaceHolder1.Controls.Add(ctrl)
19
2545
by: Siobhan | last post by:
Hi What is the recommended way to store a user's database credentials across the pages of a web application so that each time the database is accessed the system doesn't have to ask them for their username and password again We have previously stored these in a session variable (encrypted) and retrieved from their - but are worried about the impact on performance if the number of users increases. Had thought about cookies but worried...
2
3277
by: xenophon | last post by:
I added a Hidden Form Field to a form in the code behind. The value is being set in JavaScript client-side, but it is not persisting to the server in the PostBack. I know the value is being set properly because it displays in the document.write method. Create a simple page and paste the below in the code-behind (ASP.NET 1.1-SP1) using System;
5
4838
by: Dick | last post by:
I have a GridView bound to an ObjectDataSource. I have a Button that calls GridView.DataBind. I want the row that is selected before the DataBind to still be selected afterwards. This happens automatically if the data doesn't change. But if records have been added or deleted then it looks as if some code is necessary: I've done this by using GridView.SelectedValue to get the key value of the currently selected Row and then by itterating...
0
10198
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10032
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
9978
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
8860
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
7392
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
5293
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...
0
5432
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3947
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
2
3551
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.