Search code examples
visual-studiodotnetnukedotnetnuke-module

dnn filepickeruploader control


Am developing a module for DotNetNuke 7. I want to be able to upload a thumbnail image for entries in a catalogue. Have managed place control in edit view of my module and upload and select files however when I build the project I get the following error:

C:\dnn\dotnetnuke\DesktopModules\EventCatalog\Edit.ascx.designer.cs(103,38,103,41): error CS0234: The type or namespace name 'Web' does not exist in the namespace 'DotNetNuke' (are you missing an assembly reference?)

Also I can't figure out how to get the selected file on the backend to save the url to database. When I enter the ID of the control VS recognizes it but intellisense doesn't provide any clues as possible options.

Can anyone tell me how to fix the above error and also if possible, point me towards a overview/tutorial for this control. Have done a fair amount of Googling but not found anything.


Solution

  • Well, to start, you probably need to add an assembly reference to DotNetNuke.Web to your project. Once that's there, it'll probably help with your lack of intellisense as well.

    Looks like the main way you interact with the selected URL is via the FileID property. The control itself will manage saving the file to the selected FolderPath (which may or may not be something the user can change).

    But, you're right, there aren't good resources for how to use the control. The best "tutorial" it probably looking through the DotNetNuke core code to see how the core uses the control.