I put the fileupload control in asp:updatepanel. This is not working. If i remove the updatepanel upload is working...
But, my requirement is using updatepanel i have to upload file..help me..
Thanks in advance...
I put the fileupload control in asp:updatepanel. This is not working. If i remove the updatepanel upload is working...
But, my requirement is using updatepanel i have to upload file..help me..
Thanks in advance...
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Purushottam RathorePosted Apr 29, 2009, 1:25 AM
HI ramesh
Use this line of code, this will help you to resolv your problem.
protected void Upload_Click(object sender, EventArgs e)
{
if (FileUpload1.HasFile)
{
FileUpload1.SaveAs(MapPath("~/Image/" + FileUpload1.FileName));
System.Drawing.Image img1 = System.Drawing.Image.FromFile(MapPath("~/image/") + FileUpload1.FileName);
NormalImage.ImageUrl = "~/Image/" + FileUpload1.FileName;
}
}