locked
FileUpload control on webpart HasFile always false RRS feed

  • Question

  • Hi,

    I created a simple file upload webpart based on this: http://www.c-sharpcorner.com/UploadFile/b8e86c/custom-webpart-to-upload-file-in-sharepoint-document-library/

    And after I navigate to the page using URL:
    http://<myhost>/SitePages/FileUploadPage.aspx
    choose the file and click Upload - the control doesn't have the file.

    But - when I do the same using the URL for page edit - where the webpart also is shown:
    http://<myhost>/SitePages/FileUploadPage.aspx?PageView=Shared&InitialTabId=Ribbon.WebPartPage&VisibilityContext=WSSWebPartPage

    What is the difference ? How to make it work in first case ?

    Thanks in advance for suggestions.

    Saturday, July 16, 2016 5:56 AM

Answers

  • Hey please check out the links

    http://www.codeproject.com/Questions/317032/FileUpload-hasfile-always-false

    http://sharepoint.stackexchange.com/questions/126249/fileupload-controls-hasfile-property-returning-false-even-after-file-is-sele


    Please remember to click &#39;Mark as Answer&#39; on the answer if it helps you

    Sunday, July 17, 2016 6:13 PM