473,480 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Can you persist table cell values like you can do with form field values?

Under ASP.NET (C#) I want to create a page that people can use to submit
questions. This page will consist of a table with several rows of
information, like:
Name: Bill Smith
Job title: Developer
Address: 123 Main Street.

After the table of information will be the web form. So basically I want to
display the table and then have the web form.

At the time the page is first displayed (before the form is submitted - the
GET request) I want to dynamically set all the values in my table as shown
above (Bill Smith, Developer, etc) based on a db lookup. That I know how to
do. But once the web form is submitted (the POST request/postback) I want
to be able to read in those values from the table cells that I set during
the GET - without having to look them up from the db again. I could store
all the values into session variables or make them into hidden form field
values that get posted back in, but that seems messy.

Is it possible to set things up so that when the page is posted back the
table cell values I set previously (Bill Smith, Develooper, 123 Main Street)
persist automatically through the power of ASP.NET - or do I have to get
fancy and persist them on my own so that I have the values during the POST
without having to look them back up? Either way, any tips on the easiest,
most straight-forward way to do this is greatly appreciated.

Thank you.
Nov 18 '05 #1
1 1988
I use Business Object classes for this.
The BO is pouplated by the DB and bound to the form controls.
I also use Rick Strahl's 2 way databinding controls so that I can call
Unbind and all the form data is put into the BO with a single command. Then
I toss the BO in Session for later use.

http://www.west-wind.com/presentatio...atabinding.asp

--
Joe Fallon
"Richard Dixson" <re***@here.com> wrote in message
news:Lb********************@comcast.com...
Under ASP.NET (C#) I want to create a page that people can use to submit
questions. This page will consist of a table with several rows of
information, like:
Name: Bill Smith
Job title: Developer
Address: 123 Main Street.

After the table of information will be the web form. So basically I want to display the table and then have the web form.

At the time the page is first displayed (before the form is submitted - the GET request) I want to dynamically set all the values in my table as shown
above (Bill Smith, Developer, etc) based on a db lookup. That I know how to do. But once the web form is submitted (the POST request/postback) I want
to be able to read in those values from the table cells that I set during
the GET - without having to look them up from the db again. I could store
all the values into session variables or make them into hidden form field
values that get posted back in, but that seems messy.

Is it possible to set things up so that when the page is posted back the
table cell values I set previously (Bill Smith, Develooper, 123 Main Street) persist automatically through the power of ASP.NET - or do I have to get
fancy and persist them on my own so that I have the values during the POST
without having to look them back up? Either way, any tips on the easiest,
most straight-forward way to do this is greatly appreciated.

Thank you.

Nov 18 '05 #2

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

Similar topics

3
1602
by: HoustonLucifer | last post by:
Hi all, i have two questions 1) I have an asp page where the user clicks on an add button which adds rows to the HTML table. When the user clicks on the submit button the same form is posted...
2
4871
by: Spanky | last post by:
Thanks for any help in advance! I have this order form where you add rows as you need them. The routine to add fields is working fine. I am trying to add the ability to delete rows if you...
1
7865
by: Dom Nicholas | last post by:
Hi, I have a table (inside a form) that is dynamically created ie the user can add / remove rows dynamically. Each table row has 4 columns : a selection pull down list a text field for...
6
18815
by: Paul | last post by:
I was wondering if anyone has had an issue where using vba code to read an excel file and import the data into an access table some records are not imported from the excel file. It seems looking at...
41
6050
by: Ruby Tuesday | last post by:
Hi, I was wondering if expert can give me some lite to convert my word table into access database. Note: within each cell of my word table(s), some has multi-line data in it. In addition, there...
1
5418
by: Paul Perot | last post by:
Hi All: I have a DataTable that I have defined Globally. I populate this datatable dynamically with file/folder information that I read directly from the server. I use this datatable...
2
2345
by: Richard Dixson | last post by:
Under ASP.NET (C#) I want to create a page that people can use to submit questions. This page will consist of a table with several rows of information, like: Name: Bill Smith Job title:...
1
4905
by: planetthoughtful | last post by:
Hi All, I have a web page that presents records in a table, with one row per record. I'd like to put an edit button next to each record, such that if a user clicks on the edit button next to...
2
4618
by: GD | last post by:
Hi, I am trying to get values from table cells and textboxes that have same component names in a table after posting to the same page. Javascript is able to get the component values while the...
0
7048
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6911
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7091
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...
1
6743
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...
1
4787
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...
0
2999
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...
0
2988
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1303
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 ...
1
564
muto222
php
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.