Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

The best choice for your web site host, email hosting, and domain registration.
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
The best choice for your web site host, email hosting, and domain registration.
 


  Sponsors  

Meet Our Sponsors

OnyakTech
The best choice for your web site host, email hosting, and domain registration.
CrystalTech Web Hosting™
Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
AspDotNetStoreFront - E-Commerce by Design - The Leading ASP.NET shopping cart platform for developers!
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  Documents Modul...  Use of portal:url control
Previous Previous
 
Next Next
New Post 5/17/2007 1:40 AM
User is offline Alessandro
1 posts
10th Ranked


Use of portal:url control 

I am a very beginner of DNN and am trying to create a module using the portal:url control. I have a couple of easy questions (not for me):

1) Speficying an existing File (URLType=F) I get URL="FileID=20"

how do I get the file in order to use it in the module?  How do I get the file name corrsponding to FileID=20 ?

2) How is it possible not to show the details like Track Number, Log the users Open Link...  ?

Thanks

Alessandro

 
New Post 2/12/2008 6:18 AM
User is offline Dario Rossa
224 posts
dotnetnuke.dariorossa.it
9th Ranked




Re: Use of portal:url control 

Hi Alessandro,

To the first question, here is my answer: you should catch the url coming out of the urlControl and format it before storing it to the database. I resolved this way:

Dim ImageUrl As String = ""
Select Case MyUrlControl.UrlType
  Case "F"
    Dim ImageFileId As Integer = Integer.Parse(MyUrlControl.Url.Substring(7))
    Dim objFileController As New FileController
    Dim objImageInfo As DotNetNuke.Services.FileSystem.FileInfo = objFileController.GetFileById(ImageFileId, PortalId)
    ImageUrl = PortalSettings.HomeDirectory & objImageInfo.Folder & objImageInfo.FileName
  Case "U"
    ImageUrl = urlImage.Url
End Select

In addition, check this post:

http://forums.asp.net/p/873170/986848.aspx

Answering the second question, you can manage it in your control.ascx file with:

<dnn:URL ID="MyUrlControl" runat="server" FileFilter=".jpg,.gif"
            ShowFiles="true" ShowTrack="false" ShowLog="false" />

Hope it helps,

Dario Rossa.


Dario RossaDario Rossa
Personal WebSite: http://www.dariorossa.it
DotNetNuke: http://dotnetnuke.dariorossa.it
 
New Post 2/13/2008 6:20 AM
Online now... Mitch Sellers
5357 posts
www.mitchelsellers.com
3rd Ranked




Re: Use of portal:url control 

Another option to get the file path, to avoid the direct file path is to use the following method.

DotNetNuke.Common.

Globals.LinkClick("FileId=20", this.TabId, this.ModuleId)


-Mitchel Sellers
MCITP, MCPD, MCTS
Director of Development
IowaComputerGurus Inc.
View Mitchel Sellers's profile on LinkedIn

Visit mitchelsellers.com for DotNetNuke tutorials, modules and technical help

Custom DotNetNuke Services Available (Development, etc).

My sites are hosted with 3Essentials
 
New Post 6/7/2008 4:48 PM
User is offline toadkicker
29 posts
10th Ranked


Re: Use of portal:url control 

FWIW, I know this is a bit of an older post but I just implemented this on my page and URLControl seems to not work with multiple values in the FileFilter when uploading. I'm on DNN 4.8.3 and couldn't upload a file with it until I had filefilter only showing 'jpg'. Which in my case is fine, but really just annoying to figure out.

 
New Post 7/21/2008 8:04 PM
User is offline Briana Tarrance
45 posts
www.virtual-essentials.com
10th Ranked


Re: Use of portal:url control 

Hey there toadkicker - you can use FileFilter="jpg,bmp,gif,jpeg,png"  to have multiple files -- just make sure there are not any spaces in between. Also, when I'm doing multiple extensions, I don't use the "." on the extension..not sure if it will accept it or not, but it works for me. I do have a single FileFilter using a . with the extension however. Hope that helps fix your annoyance.

 

 

 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  Documents Modul...  Use of portal:url control
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Mad Development: dotnetnuke design and development
We are an expert Dotnetnuke shop specializing in developing solutions that merge the requirements of design and branding, content management, ecommerce, search engine optimization and business logic.
www.MadDevelopment.com
telerik
telerik r.a.d.controls suite is the most innovative and comprehensive toolset for ASP.NET development, tailored for seamless integration with the DotNetNuke project. This integrated collection of controls allows professionals to build web-solutions with the UI richness and responsiveness of desktop applications.
dnn.telerik.com
CrystalTech
CrystalTech Web Hosting™ provides first-class service and support. Our value-packed ASP.NET plans offer DNN installation, SQL 2005 and up to 100 domain names starting at only $16.95 per month!
CrystalTech.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP