473,385 Members | 1,622 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,385 software developers and data experts.

local data of a Page

Hello,
I am learning ASP.NET. I need to keep some information for a Page-derived
object (.aspx page). May I use private members or should I use ViewState of
other mechanism? I ask because the information mentioned should be available
across page-reloads.
Could you help me plase?
Thank you very much!
/RAM/
Dec 21 '06 #1
2 1084
Hi,

R.A.M. wrote:
Hello,
I am learning ASP.NET. I need to keep some information for a Page-derived
object (.aspx page). May I use private members or should I use ViewState of
other mechanism? I ask because the information mentioned should be available
across page-reloads.
Could you help me plase?
Thank you very much!
/RAM/
The Page object is created when the request arrives, and is then
destroyed after the response is sent. Private variables are not kept
across page-reloads.

There are multiple ways to keep information across page-reloads.
Viewstate is one, but it has the disadvantage that it is sent to the
client and back to the server every time, which causes an increase in
traffic.

Other ways are:

- Session state (only available on the server)
- Cookies (also sent back and forth)
- Hidden fields (also sent back and forth)
HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Dec 21 '06 #2
If you want to allow access accross several pages use the application
object
Alexander Higgins
http://www.affordablewebdesignsinc.com

Dec 21 '06 #3

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

Similar topics

2
by: Titus Cheung | last post by:
Hello, I want to write some code such that it'll update (ie insert, delete, etc) some data to/from a mySQL database whenever a user hit an HTML form button (ie Submit). Now what I find annoying...
11
by: alex | last post by:
Hi, I am looking for a way to populate an HTML table from an external local text file which looks like this: DATE/TIME LAT. LON. DEPTH. ML....
0
by: Unigroup of New York | last post by:
Content-Type: multipart/mixed; boundary="------------C465DF38DCB38DD2AF7117E0" Lines: 327 Date: Tue, 15 Feb 2005 23:36:38 -0500 NNTP-Posting-Host: 24.46.113.251 X-Complaints-To: abuse@cv.net...
1
by: Ray in HK | last post by:
What are the differences between LOAD DATA INFILE and LOAD DATA LOCAL INFILE ? I found some web hosting company do not allow using LOAD DATA INFILE but allow LOAD DATA LOCAL INFILE. The reason...
0
by: MikeL | last post by:
I am using Access 2K and have created a simple data access page which only works properly when it is run from the local C drive. The data file that is being accessed is held on a shared network...
1
by: pStan | last post by:
Nubie Question...I'm sure this is simple, but here goes anyway. I have a small VB.Net application that uses a local Access Database. I want that same local data replicated to an Internet web site...
7
by: bclegg | last post by:
Hi, I have a Monitoring application that needs to output single line summaries to a local dot matrix printer loaded with line flow. ie. It will have exclusive use of the printer which is connected...
1
by: Matt Walker | last post by:
I decided to flesh out my php skills by building a web application which could scan through local files on my intranet (specifically mapped drives on my server) and generate a list of Movies or...
8
by: mouac01 | last post by:
I'm not sure if this is possible. I would like to have a PHP app on the Internet connect and write to a local database (Intranet). For example, users would go to a web site...
7
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
Dear, I do have an ASP page with vbscript code entirely executed on the IIS server. The page contains a lot of data coming from the SQL Server. I want to populate one of the <selectboxes on that...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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...

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.