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.0asp:FileUpload tag does not work in custom moduleasp:FileUpload tag does not work in custom module
Previous
 
Next
New Post
1/7/2008 6:05 PM
 
Hello, all.

I am currently working on a custom module that involves allowing an authenticated user to upload images to associate with other content that they are adding to the module. In order to allow the user to select and upload a file, I am using the server tag.

However, the tag is not working - event after selecting a file and clicking on the "submit form" button, no upload occurs - and when I put breakpoints on to my Page_Load event, I can see that the FileUpload element has an empty FileName attribute.

Does anyone know why my FileUpload is being reset to nothing even before the Page_Load event, and how I could prevent it?

Thanks,
Girasquid
 
New Post
1/7/2008 6:34 PM
 

use the DNN webupload control instead, that also cares for DNN security and secure folders.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
1/7/2008 6:44 PM
 
Can you link me to any documentation or examples that use it? I can't seem to find anything via Google.
 
New Post
1/7/2008 11:27 PM
 

Is the "submit" button contained within an AJAX update panel or have you enabled "Supports Partial Rendering" in the module control's definition? If so, note that for a file to be uploaded, a FULL postback is required. If this is the case, it is possible to force the "submit" button or whatever button you have designated to trigger the actual upload (after the file has been selected with the FileUpload control) to perform a full postback. Include the following line of code in your Page_Load event handler:

              Framework.AJAX.RegisterPostBackControl(btnUpload)

where btnUpload is a reference to the button which triggers the upload.

You might be interested in taking a look at the image upload AND editing control on which I have been working occasionally for the past several months.  A demonstration of a rather early version may be seen at: http://www.wesnetdesigns.com/Projects/ImageEditor/tabid/114/Default.aspx

I am now in the processing of wrapping the editor control in a DNN aware custom server control which will mimic many of the properties of the DNN UrlControl (which is the one that I believe Sebastian referred to) as they relate to user/role permissions and secure storage.  I had run into a few problems with state persistance when switching in and out of editor mode but now have most of them solved.  I also plan to wrap the same upload and editor functions into a custom PropertyEditorControl. Both will be made freely available to the DNN community.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
1/8/2008 2:11 AM
 

It's quite easy. First, put this code on top of your .ascx file :

<%@ Register TagPrefix="Portal" TagName="URL" Src="~/controls/URLControl.ascx" %>

Then just put your DNN web upload :

<Portal:URL ID="ctlLogo" runat="server" Width="325" ShowUrls="False" ShowTabs="False" ShowLog="False" ShowTrack="False" Required="False"></Portal:URL>

Let DNN user control manage your upload file.

HTH.

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0asp:FileUpload tag does not work in custom moduleasp:FileUpload tag does not work in custom module


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