File Upload control AJAX effect

Since long I was wondering on how I will be able to use FileUpload control inside UpdatePanel and I am sure there will be lot of other people who were expecting the same to be working. I found an intersting video article by Joe Stagner in which he described how to use the FileUpload control inside iframe to give some AJAX effect. You can find this video here. http://www.asp.net/learn/videos/video-254.aspx

3 Comments

  • you can use FileUpload control inside UpdatePanel .
    Check the code below




















    in Code behind file

    protected void btnSubmit_Click(object sender, EventArgs e)
    {
    try
    {
    if (FilePhoto.HasFile)
    {
    HttpPostedFile img= FilePhoto.PostedFile;
    /* code as per your requirement */
    }
    }
    catch (Exception ex)
    {
    throw new Exception(ex.Message.ToString());
    }
    }


  • I'd like to thank you for the efforts you've put in
    writing this website. I am hoping to view the same high-grade blog posts by you in the future as well.
    In fact, your creative writing abilities has motivated me
    to get my own, personal website now ;)

  • Excellent post. I used to be checking continuously this weblog and I'm impressed! Extremely helpful information specially the final part :) I maintain such information a lot. I used to be seeking this certain info for a very long time. Thanks and good luck.

Comments have been disabled for this content.