+1-888-365-2779
Try Now
More in this section

Forums / 3.x Pre-release forums (retired) / FileUpload in RC1 Module

FileUpload in RC1 Module

4 posts, 0 answered
  1. Pete
    Pete avatar
    3 posts
    Registered:
    05 Apr 2007
    05 Apr 2007
    Link to this post
    I've noticed that the ASP.NET 2.0 FileUpload control fails to work in a control loaded by a module.  I've created a very simple module and in every test, FileUpload.HasFile is false.  Looking at the generated html, I see that "enctype='multipart/form-data'" is stripped from the form tag.  FileUpload adds this automatically in vanilla ASP.NET.

    Any known workarounds/fixes besides r.a.d.Upload or HtmlInputFile?  We're trying to reuse a custom library here.

    Thanks!
    -Pete
  2. Vlad
    Vlad avatar
    498 posts
    Registered:
    15 Jul 2016
    06 Apr 2007
    Link to this post
    Hello Pete,

    We tested with ASP.NET 2.0 FileUpload control and it works fine with our Sitefinity project.  The "enctype='multipart/form-data'" was rendered in the form tag. We used the attached user control for our tests. 
    Please make sure that the form tag is set CmsForm instead of the default HtmlForm in the master page (xxx.master):

    <sf1:CmsForm ID="form1" runat="server">

    Actually, the FileUpload worked fine with both forms (ASP.NET HtmlForm and Telerik CmsForm). Please try both cases and let us know if there is any difference.

    Also you can send us your custom module, so we could investigate it locally.

    Greetings,
    Vlad
    the telerik team

    Instantly find answers to your questions at the new telerik Support Center
  3. Pete
    Pete avatar
    3 posts
    Registered:
    05 Apr 2007
    09 Apr 2007
    Link to this post
    I wasn't clear enough in my previous post.

    The issue occurs when Telerik.WebModule.CreateControlPanel() is used to load the custom admin control via parent.LoadControl().

    How can I send my custom module?

    Thanks for your help!
    Pete
  4. Vlad
    Vlad avatar
    498 posts
    Registered:
    15 Jul 2016
    11 Apr 2007
    Link to this post
    Hello Pete,

    We created a sample module (the project is attached to this post), which creates a FileUpload control in Telerik.WebModule.CreateControlPanel() method. It works fine with us. Please check the implementation.

    As for sending the module, you can archive the module files and attach the zip into your post.

    Let us know if you experience any difficulties.

    Regards,
    Vlad
    the telerik team

    Instantly find answers to your questions at the new telerik Support Center
Register for webinar
4 posts, 0 answered