if (fileuploadlogo.PostedFile.ContentLength == 0)
{
lblerrordesc.Visible = true;
lblerrordesc.Text = "Please Upload Photo !!!";
}
else
{
Stream imgStream = fileuploadlogo.PostedFile.InputStream;
int imgLen = fileuploadlogo.PostedFile.ContentLength;
string imgContentType = fileuploadlogo.PostedFile.ContentType;
byte[] imgBinaryData = new byte[imgLen];
int n = imgStream.Read(imgBinaryData, 0, imgLen);
photodata = imgBinaryData;
phototype = imgContentType;
Session["photodata"] = imgBinaryData;
Session["phototype"] = imgContentType;
Image3.ImageUrl = "studentphoto.aspx?type=" + imgContentType + "";
}
Saturday, May 22, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment