Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Why Repeater.ItemCreated is fired before Page_Load on postback

Reply
Thread Tools

Why Repeater.ItemCreated is fired before Page_Load on postback

 
 
Philippe Camus
Guest
Posts: n/a
 
      03-30-2006
I didn't find any documentation about this behaviour.
On postbacks the Repeater ItemCreated event is fired before Page_Load event
It occurs for each item with empty RepeaterItemEventArgs.Item.DataItem.

Does anybody know more about this strange behaviour?

Thanks

Philippe
 
Reply With Quote
 
 
 
 
Karl Seguin [MVP]
Guest
Posts: n/a
 
      03-30-2006
ItemCreated is used on postback to recreate the repeater from the viewstate.
It's normal that DataItem is going to be null. When the repeater is
initially bound, it won't be null because there's an actual underlying
datasource. Since the viewstate is used to rebuild it on postback, and not
the datasource (which is lost), DataItem is null.

I believe, but am not sure, that on postback ItemCreated is called by either
the LoadViewState or PorcessPostbackData page events - both of which happen
before Load.

Karl
--
http://www.openmymind.net/



"Philippe Camus" <> wrote in message
news:Xns97968EDEA5166pcamussynapschcom@212.129.5.2 ...
>I didn't find any documentation about this behaviour.
> On postbacks the Repeater ItemCreated event is fired before Page_Load
> event
> It occurs for each item with empty RepeaterItemEventArgs.Item.DataItem.
>
> Does anybody know more about this strange behaviour?
>
> Thanks
>
> Philippe



 
Reply With Quote
 
 
 
 
Philippe Camus
Guest
Posts: n/a
 
      03-30-2006
Karl, Many thanks for these infos
Regards,
Philippe
 
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
newbie: Page_Load is fired on postback in mvp app Jeff ASP .Net 4 07-06-2010 09:06 AM
custom server control event before Page_Load fired Michal Valent ASP .Net 2 11-27-2007 04:25 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
Materpage page_load event fired after content page_load? rockdale ASP .Net 1 11-16-2006 06:59 PM
page_load is fired AFTER other properties and functions are called on control - WHY? Richard Murphy ASP .Net Web Controls 0 08-07-2003 08:42 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57