protected void btn_submit_Click(object sender, EventArgs e) { string profile_photo_url = ""; int reg_id = Convert.ToInt32(Session["reg_id"].ToString()); string currentDateTime = string.Format("{0:mmddyyhhmmss}", DateTime.UtcNow); if (fu_profile_photo.HasFile) { profile_photo_url = "~/Lib/images/" + reg_id + "_" + currentDateTime + ".jpg"; fu_profile_photo.SaveAs(Server.MapPath(profile_photo_url)); } int i = bl.insert_candidate(reg_id, txt_unions.Text, Convert.ToInt32(drp_post.SelectedValue), Convert.ToInt32(txt_percentage.Text), profile_photo_url); if (i > 0) { lbl_request.Visible = true; } // int cnd_id = bl.get_cnd_id(reg_id); // Session["cnd_id"] = cnd_id; // Response.Redirect("stu_cnd_view.aspx"); }