Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Store values from datareader

Posted on 2008-06-12
2
Medium Priority
?
199 Views
Last Modified: 2010-04-21
Greetings all

I have a series of values (eg. LatestTitle, Author, WhereAvailable) stored in a table (which will only ever contain a single record). This will be read when the page first loads and be dispalyed  appropriately.

My idea is to use a DataReader to retrieve the values and store them in AspHyperlink, AspLabel and ASPTextBox.

My questions:-

1.  Is the DataReader the best way to go for this (assuming that the data won't change)?
2.  Am I correct in saying that the fields, once populated, will retain their values during PostBAck?

In advance, thanks!

   allanmark
0
Comment
Question by:allanmark
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 21

Accepted Solution

by:
naspinski earned 800 total points
ID: 21768835
DataReader is fine as a data access method.  Of which there are countless (I am very fond of LINQ right now).
For speed of such a small entry I would probably use a local XML file as I am assuming this table is stored in a SQL db and that requires a DB call each time.

As for the postback question, you are correct, they will stay populated on postback.
0
 

Author Closing Comment

by:allanmark
ID: 31466521
Many thanks!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question