Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Can you persist table cell values like you can do with form field values?

Reply
Thread Tools

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

 
 
Richard Dixson
Guest
Posts: n/a
 
      05-18-2004
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.


 
Reply With Quote
 
 
 
 
Joe Fallon
Guest
Posts: n/a
 
      05-18-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
form input text in table; how to fill table cell space sdf HTML 3 12-06-2007 03:29 PM
Pass hidden form field value to another form field to insert in db GavMc ASP General 4 09-22-2005 06:33 PM
Can you persist table cell values like you do with form field values? Richard Dixson ASP .Net 2 05-18-2004 01:11 PM
copy and paste form RTF document into field in asp form cause it to bypass field length and javascript validation - how to overcome? NotGiven Javascript 3 05-13-2004 12:15 AM
copy and paste form RTF document into field in asp form cause it to bypass field length and javascript validation - how to overcome? NotGiven ASP General 3 05-13-2004 12:15 AM



Advertisments