RaduploadContext

Thread is closed for posting
5 posts, 0 answers
  1. Philip Saltskog
    Philip Saltskog avatar
    60 posts
    Member since:
    Mar 2004

    Posted 21 Aug 2008 Link to this post

    Any solution on this problem?

    Dim file As UploadedFile = RadUploadContext.Current.UploadedFiles(fileBild.UniqueID) 

    I'm using a regular <input type="file"> for the selection of file and it's always empty.
    I try this
    Dim file As UploadedFile = UploadedFile.FromHttpPostedFile(Request.Files(fileBild.UniqueID)) 
    And I get an error in here too?

    Do you have an example of this in ajaxified version :)

    /Thanks
  2. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 21 Aug 2008 Link to this post

    Hi Philip Saltskog,

    What is the error that you get when you use this:
    Dim file As UploadedFile = UploadedFile.FromHttpPostedFile(Request.Files(fileBild.UniqueID)) 

    You can also try:
    Dim file As UploadedFile = UploadedFile.FromHttpPostedFile(Request.Files(0)) 


    Best wishes,
    Veskoni
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Philip Saltskog
    Philip Saltskog avatar
    60 posts
    Member since:
    Mar 2004

    Posted 21 Aug 2008 Link to this post

    I'm using this in another projekt.

    Dim

    file As UploadedFile = UploadedFile.FromHttpPostedFile(Request.Files(fileBild.UniqueID))


    I get the error when fileBild is empty

                Dim file As UploadedFile = UploadedFile.FromHttpPostedFile(Request.Files(fileBild.UniqueID))
                If Not file Is Nothing Then
                    If file.FileName.Trim().Length > 0 And file.ContentLength > 0 Then
       ' Things todo

                    End If
                End If

    Web.config

    <httpHandlers>    
     <add verb="*" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler, Telerik.Web.UI" />
    </httpHandlers>

    <httpModules>
          <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI" />
    </httpModules>

    <

    asp:FileUpload ID="fileBild" runat="server" />

    /Thanx

  4. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 21 Aug 2008 Link to this post

    Hello Philip Saltskog,

    I tried that code, but it worked fine on my side. Can you please open a support ticket and send us a sample running project that exhibits the problem?


    Sincerely yours,
    Veskoni
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  5. Philip Saltskog
    Philip Saltskog avatar
    60 posts
    Member since:
    Mar 2004

    Posted 21 Aug 2008 Link to this post

    Yes ,sure.
Back to Top