Hi
string PicExtension = "";
string newpic = "";
if (fuUploadFile.PostedFile.ContentLength > 0)
{
string ImageName = fuUploadFile.PostedFile.FileName;
string[] Pic = ImageName.Split('.');
PicExtension = Pic[1].ToString();
newpic = "1" + "." + PicExtension;
string virtualpath = Server.MapPath(@".\UserProfilePic\" + newpic); //Server.MapPath(@".\UserPicPath\" + newpic);
fuUploadFile.PostedFile.SaveAs(virtualpath);
}
It is giving error "Object reference not set to an instance of the object".
Thanx