I use dnn:dnnfilepicker in my module to upload an image to a specific folder.
Here is what I'm doing in the source code.
+ In edit.ascx:
<%@ Register TagPrefix="ctrl" Assembly="DotNetNuke.Web" Namespace="DotNetNuke.Web.UI.WebControls" %>
<ctrl:DnnFilePicker ID="urlLargeImageFile" CommandCssClass="px_link_upload_file" LabelCssClass="px_label_upload_file" ShowDatabase="false" runat="server" FileFilter="jpg,jpeg,jpe,gif,bmp,png" ShowFolders="false" required="false" FilePath="/LargeImages/"></ctrl:DnnFilePicker>
+ In edit.ascx.cs:
I placed the following line of code in Page_Load.
FeatureController fc = new FeatureController();
ItemInfo item = fc.GetItem(ItemID);
urlLargeImageFile.FileID = tem.LargeImageFileID;
I'm expecting that the name of large image will be populated as a selected item in file dropdown list. I saw it in the list but it's not selected. The <none Specified> value has been selected instead.
Can someone please help to make it work? I really appreciate any ideas you have. Thanks in advance!