views:

73

answers:

1

I have a WebForms project where we are using Linq to SQL (L2S) to provide data access. I know L2S can handle timestamps, but what I'm wondering is, what is the best way to handle timestamps at the client side.

I'm thinking that one possibility is to simply put the timestamp into a hidden field when an entity is rendered, but this feels a bit hacky, another option would be to put the timestamp / whole object into a session variable, but again this doesn't feel very clean.

What alternatives are there?

A: 

It depends on whether you're talking lists of DTOs, or a single DTO.

For single DTOs, I'd put the timestamp and the ID into the viewstate.

For lists, I'd put hidden fields inside whatever list mechanic you prefer (gridview / repeater / manually building tables (yuk!)).

JustLoren
It's a list of entities at the moment, I guess yucky is the way to go.
ilivewithian
The yuk was in regards to manually building tables. I'm upgrading a project that does that extensively. I want to gouge my eyeballs out :p
JustLoren