Where can I create this object in the asp.net lifecycle methods without receiving an out of range exception. Right now the only place that I can actually get a resource collection containing values is in onreasourcefetched method for webschedule info. But I need to do this before webscheduleinfo is created and it's views are populated with users.
protected void Page_Init(object sender, EventArgs e)
{
ResourcesCollection resources = WebScheduleInfo1.VisibleResources;
int count = resources.Count;
Resource obje = (Resource)resources.GetItem(1);
string name = obje.Name;
resources.Clear();
resources.Add(obje);
this.WebScheduleInfo1.ActiveResourceName = name;
}