This is a migrated thread and some comments may be shown as answers.

Why restore tabs in Page_load not Page_init?

1 Answer 47 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Sean
Top achievements
Rank 2
Sean asked on 13 Mar 2011, 10:33 PM
Hi All,

I was just curious why examples show restoring tabs/page views during Page_Load and not Page_Initialization? 

E.G. in this example. Yet, I thought it was best practice to reinitialize all your lost dynamically created controls in Page_Init?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 16 Mar 2011, 02:51 PM
Hi Sean,

In general you are right that the dynamically created controls should be placed in Page_Init. However, since a Tab or a PageView are not controls but just parts of different controls like RadTabStrip or RadMultiPageView it will be too early in the page lifecycle for them to load if you place them in the Page_Init.  

Greetings,
Kate
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
TabStrip
Asked by
Sean
Top achievements
Rank 2
Answers by
Kate
Telerik team
Share this question
or