Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0FileUploader.HasFile In Settings Page of a Module is always returning falseFileUploader.HasFile In Settings Page of a Module is always returning false
Previous
 
Next
New Post
3/3/2009 1:10 PM
 

hello,

Please review the following code i have written in settings page of a custom module i have developed.

if

 

(FileUploadImage.HasFile)

FileUploadImage.PostedFile.SaveAs (Files_Path + FileUploadImage.FileName);

}

This code perfectly works in View page, but not works in settings page of the module.  FileUploadImage.HasFile always returning false.  How to get work this method in settings page, do there anything i miss? 

thank you

{

 
New Post
3/3/2009 1:34 PM
 

I suggest to use DotNetNuke URL control or WebUpload control instead to make sure, the file is included in portal files and all storage options are applied appropriately.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
3/3/2009 11:23 PM
 

We had this same problem.  Found this site that explains the solution:

A couple of days ago I was working with a client who was having trouble using the File Upload Control from within a DotNetNuke module.

The problem we were seeing was that although all the code had been written correctly and looked just like every other implementation of the code I had ever used when the server side tested to see if a file had been uploaded, the file was not there… even though we had just uploaded a file.

What The Expletive?

 

A search of Google showed that the FileUpload control doesn’t work with the Update Panel. So I asked the client, “Are you using the Update Panel?” No, he wasn’t. Odd, it sure is acting like he is.

As things turned out he was using the Update Panel, only he didn’t know he was because this is DotNetNuke we are using. In DotNetNuke all you have to do to use an Update Panel, and in fact all you SHOULD do is to tell DotNetNuke that your module is going to use the Update Panel is to check the “Partial Rendering” check box when you define the module under module definitions.

So if you are having a problem with the FileUpload and haven’t checked the module definitions yet, go there now. Bet you it’s checked. Uncheck it and you’ll be able to use the file upload control.

 
New Post
3/4/2009 9:19 AM
 

Hi,

Yes, partial rendering of "settings" page is UnChecked and the fileuploader control is inside a UpdatePanel. 

In settings page, when the UpdateSettings method will execute, FileUploaderControl.hasfile is returning false, when there is a file browsed.

I have made it sure, that the FileUploader control is inside a UpdatePanel and partial rendering of "Settings" page is unchecked.

This happens in module's settings page only.  In View.Ascx Page, the fileuploader is working perfectly.  I dont know why it is not working on Settings Page, 

thank you,

 

 
New Post
3/4/2009 9:30 AM
 

Hello,

Sorry Misunderstood the words :(

Removed Updated Panel in "Settings" page and i have made sure, partial rendering of settings page is unchecked

Still FileUploaderControl.HasFile is returning false in UpdateSettings() method

Working fine in View.ascx page.

thank you,

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0FileUploader.HasFile In Settings Page of a Module is always returning falseFileUploader.HasFile In Settings Page of a Module is always returning false


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out