protected void Button2_Click1(object sender, EventArgs e) { if (newAvatar.HasFile) { filename = p.user_id + ".jpg"; newAvatar.SaveAs(Server.MapPath("/Profilepic/") + filename); m.imag(p.user_id); Image1.ImageUrl = "/Profilepic/" + filename; // Response.Redirect("~/Home.aspx"); } }