This is what happens when I click submit button
if (btn_add.Text == "Submit")
{
string BracketSuspensionType = Convert.ToString(txt_BracketSuspensionType.Text.Trim());
string PoleTypeID = Convert.ToString(dd_PoleTypeID.SelectedValue.Trim());
string Status = chk_Active.Checked ? "True" :"False" ;
System.Collections.Hashtable ht = (System.Collections.Hashtable)Session["UserDetails"];
Int64 UsrId = (Int64)ht["UserID"];
string CreatedBy = UsrId.ToString();
string filename = Path.GetFileName(fileuploadimages.PostedFile.FileName);
fileuploadimages.SaveAs(Server.MapPath("~/Images/" + filename));
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["valmont"].ToString());
con.Open();
SqlCommand cmd = new SqlCommand("Insert into DEF_BRACKET_ACCESSORIES_MST(BracketSuspensionType,PoleTypeID,Status,CreatedBy,CreatedOn,ImagePath) values(@BracketSuspensionType,@PoleTypeID,Status,@CreatedBy,@CreatedOn,@ImagePath)", con);
cmd.Parameters.AddWithValue("@BracketSuspensionType", BracketSuspensionType);
cmd.Parameters.AddWithValue("@PoleTypeID", PoleTypeID);
cmd.Parameters.AddWithValue("@Status", Status);
cmd.Parameters.AddWithValue("@CreatedBy", CreatedBy);
cmd.Parameters.AddWithValue("@ImagePath", "Images/" + filename);
cmd.ExecuteNonQuery();
con.Close();
Error - An exception of type 'System.NullReferenceException' occurred in App_Web_vbsffejd.dll but was not handled in user code
Additional information: Object reference not set to an instance of an object.
Error on Line-
string filename = Path.GetFileName(fileuploadimages.PostedFile.FileName);
Please suggest