protected void Page_Load(object sender, EventArgs e) { if (Session["uid"] == null) { Response.Redirect("Default.aspx"); } if (Page.IsPostBack) { adminDBDataContext admindb = new adminDBDataContext(); popup popupData = new popup(); popupData.title = Request["title"]; popupData.details = Request["details"]; popupData.button1 = Request["button1"]; popupData.button2 = Request["button2"]; admindb.popups.InsertOnSubmit(popupData); admindb.SubmitChanges(); } adminDBDataContext admindbc = new adminDBDataContext(); if (admindbc.popups.Count() > 0) { popupD = admindbc.popups.ToList().Last(); } else { popupD = new popup(); } }
partial void Updatepopup(popup instance);
partial void Deletepopup(popup instance);
partial void Insertpopup(popup instance);