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
Solved

Store values from datareader

Posted on 2008-06-12
2
190 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
2 Comments
 
LVL 21

Accepted Solution

by:
naspinski earned 200 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

840 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