protected void dgmysell_RowCommand(object sender, GridViewCommandEventArgs e) { string aid = Request.QueryString["aid"].ToString(); GallAdapter.Delete(Convert.ToInt32(e.CommandArgument.ToString())); GallDT = GallAdapter.Select_By_AID(Convert.ToInt32(aid)); dgmysell.DataSource = GallDT; dgmysell.DataBind(); MultiView1.ActiveViewIndex = 1; }
protected void Button4_Click(object sender, EventArgs e) { string aid = Request.QueryString["aid"].ToString(); MultiView1.ActiveViewIndex = 1; GallDT = GallAdapter.Select_By_AID(Convert.ToInt32(aid)); dgmysell.DataSource = GallDT; dgmysell.DataBind(); }
protected void btnupload_Click(object sender, EventArgs e) { string aid = Request.QueryString["aid"].ToString(); FileUpload2.SaveAs(Server.MapPath("~/Gallary/") + FileUpload2.FileName); GallAdapter.Insert(Convert.ToInt32(aid), "~/Gallary/" + FileUpload2.FileName, txtname.Text, System.DateTime.Now); GallDT = GallAdapter.Select_By_AID(Convert.ToInt32(aid)); dlImages.DataSource = GallDT; dlImages.DataBind(); Label1.Text = "Image Uploaded"; MultiView1.ActiveViewIndex = 0; txtname.Text = ""; }
protected void Page_Load(object sender, EventArgs e) { string aid = Request.QueryString["aid"].ToString(); if (Page.IsPostBack == false) { GallDT = GallAdapter.Select_By_AID(Convert.ToInt32(aid)); dlImages.DataSource = GallDT; dlImages.DataBind(); MultiView1.ActiveViewIndex = 0; txtname.Text = ""; } Label1.Text = ""; }
protected void Page_Load(object sender, EventArgs e) { string aid = Request.QueryString["aid"].ToString(); if (Page.IsPostBack == false) { GallDT = GallAdapter.Select_By_AID(Convert.ToInt32(aid)); dlImages.DataSource = GallDT; dlImages.DataBind(); ADT = AAdapter.Select_By_AID(Convert.ToInt32(aid)); lblalbum.Text = ADT.Rows[0]["Aname"].ToString(); } }