开发者

Update an asp.net formview's sqldatasource with a timer

开发者 https://www.devze.com 2023-03-22 03:59 出处:网络
I\'m trying to automatically update the edit template of a formview and am only succeeding in automatically wiping out any data in bound data controls (whether or not it\'s been written to the databas

I'm trying to automatically update the edit template of a formview and am only succeeding in automatically wiping out any data in bound data controls (whether or not it's been written to the database) while many of my efforts have succeeded in updating a time column in the database (updated="GetDate()").

I've tried:

1. a timer with an event handler in the code behind,

2. a timer triggering an update panel inside and outside the edititemtemplate

3. an updatepanel triggered by a timer inside or outside itself placed around the update button inside the template

4. update button with same setup as #3 outsiside the the formview.

5. I've even tried an update panel around the datasource.

6.I've tried setting the viewstate false on the formview.

Struck out on everything. Does anyone have any开发者_JS百科 ideas?

Many thanks


The solution turned out to be to use the formview's updateitem method

0

精彩评论

暂无评论...
验证码 换一张
取 消