473,382 Members | 1,421 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Why Repeater.ItemCreated is fired before Page_Load on postback

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
Mar 30 '06 #1
2 3446
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" <p.*****@synaps-ch.com> wrote in message
news:Xn*******************************@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

Mar 30 '06 #2
Karl, Many thanks for these infos
Regards,
Philippe
Mar 30 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Invalidlastname | last post by:
Hi, We are developing an asp.net application, and we dynamically created certain literal controls to represent some read-only text for certain editable controls. However, recently we found an issue...
3
by: Piotr Strycharz | last post by:
Hi, I have a Repeater with CheckBox in one of its columns. In ItemDataBound handler I'm doing: chk.CheckedChanged += new EventHandler(chk_CheckedChanged). The chk_CheckedChanged handler is...
4
by: Harry | last post by:
Hello, I have a Repeater control that contains a Label control inside its ItemTemplate. A dummy mockup of the HTML code looks as follows: <asp:repeater id="StyleRepeater" Runat="server">...
3
by: Shimon Sim | last post by:
I put linkbutton in a repeater header. I attached event handler in makeup as onclick="btnSort_Click". Made btnSort_Click method public. It doesn't fire if I click on it. I tried to attach it in...
3
by: Ben Dewey | last post by:
Hey everyone, I have a wierd issue i can't seem to find out whats going on. I have a Control for a Shopping Cart Merchant Page called OrderStatus.ascx Inside that control there is a Repeater...
4
by: Dennis E. Jones, Jr. | last post by:
I'm creating a dynamic control for each row in a REPEATER based on database values. ItemDataBound creates the control for the initial load (not postback), but I cannot get the control recreated...
9
by: Jaybuffet | last post by:
my aspx has something like this <asp:Repeater id="Repeater1" runat="server"> <ItemTemplate> <mycontrol:ctl id="ctlId" obj='<%# Container.DataItem %>' showItem="true"/> </ItemTemplate>...
1
by: Jeremy | last post by:
Hello All, I have a Repeater which contains a Dynamic DropDownList within its itemtemplate. I know I have struggled with this before and I am pretty sure I had to save a bunch of crap manually...
1
by: Rory Becker | last post by:
Hi All It's been a while since I tried anything like this and it's just driving me nuts.. I want to have simple templated repeater which contains (Per item) a Label, a textbox and a...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.