partial void Deletesponsorer(sponsorer instance);
 partial void Insertsponsorer(sponsorer instance);
 partial void Updatesponsorer(sponsorer instance);
        //tilføj Sonsorer
        protected void ButtonAdd_Click(object sender, EventArgs e)
        {
            var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvxyz0123456789";
            var random = new Random();
            var result = new string(
                Enumerable.Repeat(chars, 8)
                          .Select(s => s[random.Next(s.Length)])
                          .ToArray());

            string url = AdminClass.AdminHelper.imgupload.urlSonsorer();
            string png = AdminClass.AdminHelper.imgupload.PngImg();
            string navnImg = result + png;

            ImageNet.FluentImage imgAA = ImageNet.FluentImage.FromStream(FileUploadSonsorerImg.FileContent);
            imgAA.Save(Server.MapPath(url + "full_" + navnImg), ImageNet.OutputFormat.Png);
            imgAA.Resize.Width(140).Resize.Height(65).Save(Server.MapPath(url + navnImg));

            if (File.Exists(Server.MapPath(url + navnImg)))
            {

                //ImageResizer.ResizeSettings Billedeskalering = new ImageResizer.ResizeSettings();
                //Billedeskalering.Width = 140;
                //Billedeskalering.Height = 65;
                //Billedeskalering.Mode = ImageResizer.FitMode.Crop;

                //ImageResizer.ImageBuilder.Current.Build(UploadMappe + filenavn, Billedeskalering);

                sponsorer sponsorer = new sponsorer();
                sponsorer.img = navnImg;
                sponsorer.link = TextBoxLink.Text;

                db.sponsorers.InsertOnSubmit(sponsorer);

                db.SubmitChanges();

                AdminClass.AdminHelper.UrlReload(5);
            }
        }