when we upload file then we got that error
"Object reference not set to an instance of an object."
and we are using that code for file upload
String picname8 = System.IO.Path.GetFileName(fileup_procat_att.PostedFile.FileName);
String picext8;
int namelength8;
namelength8 = picname8.Length;
int index8 = picname8.IndexOf(".");
int sub_length8 = namelength8 - index8;
namelength8 = picname8.Length;
picext8 = picname8.Substring(index8, sub_length8);
saveLocation8 = "product catalog" + "/" + procatatt + picext8;
fileup_procat_att.PostedFile.SaveAs(MapPath(saveLocation8));