Author: SilverNight | Posted on: 7/18/2008 8:35:51 AM | Views : 418

I have try few hours but still not find any solution, the problem is

I have a webform (Default.aspx), one Webusercontrol (Datalist.ascx) and one more Webusercontrol (Label.ascx)

On Default.aspx , it's no programming logic inside.
On Datalist.ascx , It have a function on DataList fire by ItemCommand event to UPDATE a Datetime.Now.Tostring() to SQL
On Label.ascx,the Label Control will do a DataBind and Page_Load event.
Very simple.

I imagine the procedure is :
1. Click the Button on Datalist (fired ItemCommand event)
2. Update the Time on SQL Table by Now() value.
3. Label Control get the Time value which what time i click the button.

The strange problem is ,
After i click the button, it success update the time to SQL Server. But the Label control show the previous value.

I have do some debug on that, i discover that, the cycle after i click is Databind to Label (Page_Load) early then update time value t ...

Go to the complete details ...