Virtual Happy Hour is canceled this month (March) due to Good Friday.
Try our conversational search powered by Generative AI!
AI OnAI Off
Virtual Happy Hour is canceled this month (March) due to Good Friday.
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?