protected void SaveButtonButton_Click(object sender, EventArgs e) { int id = Convert.ToInt32(ButtonIdHid.Value); StreamingLiveLib.Button button = (id == 0) ? new StreamingLiveLib.Button() { SiteId = AppUser.Current.Site.Id, Sort = 999 } : StreamingLiveLib.Button.Load(id, AppUser.Current.Site.Id); button.Url = ButtonUrlText.Text; button.Text = ButtonTextText.Text; button.Save(); if (id == 0) { LoadData(); buttons.UpdateSort(); } UpdateData(); Populate(); }