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

Save user input from previous session for next session

say i have a form with many input text boxes, what is the proper way to store
these values so when the next time the user opens the form, all the input
from last session remains in the form? people recommend me to have a "cookie"
file or registry to read and write from every time. but is there an easier
way to do this, such as a feature in the .NET forms that i haven't found out
yet.

thank you
Jun 27 '08 #1
2 2628
On Jun 6, 9:01 pm, muscleking <musclek...@discussions.microsoft.com>
wrote:
say i have a form with many input text boxes, what is the proper way to store
these values so when the next time the user opens the form, all the input
from last session remains in the form? people recommend me to have a "cookie"
file or registry to read and write from every time. but is there an easier
way to do this, such as a feature in the .NET forms that i haven't found out
yet.

thank you
Hi,
If you have to close and re-launch your application(because storing
information in variables is useless here as well), you can consider
serializing XML or storing in simple text files. There are sutiable
classes in .NET for saving / reading both. (XMLreader/Writer,
StreamReader/Writer etc.)

Or you can consider My.Settings to store and have the same information/
settings after you re-run your application:
http://msdn.microsoft.com/en-us/libr...11(VS.80).aspx

Hope these help,

Onur Güzel

Jun 27 '08 #2
"muscleking" <mu********@discussions.microsoft.comschrieb:
say i have a form with many input text boxes, what is the proper way to
store
these values so when the next time the user opens the form, all the input
from last session remains in the form? people recommend me to have a
"cookie"
file or registry to read and write from every time. but is there an easier
way to do this, such as a feature in the .NET forms that i haven't found
out
yet.
In the control's property window in the IDE select "(ApplicationSettings)"
and create property bindings via "(PropertyBinding)" for the relevant
properties. The property values are then stored in the user settings
without the need for a single line of custom code.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Jun 27 '08 #3

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

Similar topics

4
by: Aliza Klein | last post by:
I am new to ASP so please pardon me if this is crazy. I have data that I want to allow the user to be able to save in a format that will then enable the user to open the data in Excel. (I have...
8
by: Ian Davies | last post by:
Hello I am trying to run a few INSERT queries only if the user clicks 'continue' in a <a href> The queries takes variables created from SELECT queries. I have tried to acheive this by putting The...
5
by: vincent | last post by:
Hi, If i login to the site again (may be in the same pc or different pc), system must allow me in and end my previous session. How do i go about doing this? This is to ensure that an user...
4
by: Nikhil Tayal | last post by:
Is there a way to write a file on the client machine from an aspx page? I've a custom query page and need to store the search criteria specified in an XML file on the user machine from my web page...
4
by: Glenn M | last post by:
I have a shared XML file on a server . i also have one xslt file that performs a simple transform on in to view the data. now i want to have another page that lets users modify the shared xml...
7
by: Simon Harvey | last post by:
Hi everyone, I'm having a frustrating problem and I don't know how to fix it without totally redoing a very complicated couple of pages on my site. I really hope some kind soul can help me :-) ...
4
by: joesin | last post by:
I recently found a vulnerability on my website that allowed sql injection. I have been trying to write some code that would clean user data but have been running into problems. The validation still...
2
by: underground | last post by:
Hi, everyone I've been trying to figure out a way for a user to update there information. I'm using sections to identify the specific user..Here is the form <? include("include/session.php");...
3
by: evenlater | last post by:
I have an Access application on a terminal server. Sometimes my users need to export reports to pdf, rtf or xls files and save them to their own client device hard drives. They can do that right...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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
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,...
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.