November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
protected override void CreateChildControls()
{
CheckBoxList list = new CheckBoxList();
PageDataCollection pages = GetPages();
foreach(PageData page in pages)
{
ListItem item = new ListItem(page.PageName,page.PageLink.ToString());
item.Selected = Subscription.IsSubscribingTo(page.PageLink);
list.Items.Add( item );
}
list.SelectedIndexChanged += new EventHandler(SaveSubscriptions);
Controls.Add(list);
}
protected void SaveSubscriptions(object sender, EventArgs e)
{
CheckBoxList list = sender as CheckBoxList;
foreach(ListItem item in list.Items)
{
if(item.Selected)
Subscription.SubscribeTo( PageReference.Parse(item.Value) );
else
Subscription.UnSubscribe( PageReference.Parse(item.Value) );
}
}
public class AB_SubscriptionList : SubscriptionList
{
//Constructor - use SubscriptionList constructor
public AB_SubscriptionList(): base(){}
//----- de overrides som jag vill göra ----
}
Hur löser jag detta?