Products

Solutions

Resources

Partners

Community

About

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.0How to get a complete URL to a file?How to get a complete URL to a file?
Previous
 
Next
New Post
11/20/2007 1:53 PM
 

Hi all, I need to get the complet url to a file that I have uploaded so I can use it as a querystring parameter for another website.  I have tried the following:

 

Dim url As String = Common.Globals.LinkClick(strFileID, PortalSettings.ActiveTab.TabID, ModuleId)

 I expected a result of something like:  http://mydomain.com/dnn/...

buy instead all I get is "/dnn/..."

So I guess my question is, how do I get the complete URL to a file, not the relative url to a file.

Thanks in advance.

Paul

 

 
New Post
11/20/2007 4:09 PM
 

Can't you do something like this?

url = Page.ResolveUrl(url)

I cannot get into my IDE and verify this right now, but I think it will work.


Will Strohl

Upendo Ventures Upendo Ventures
DNN experts since 2003
Official provider of the Hotcakes Commerce Cloud and SLA support
 
New Post
11/20/2007 4:10 PM
 

Excuse me.  A better example for you might be:

Dim url As String = Page.ResolveUrl(Common.Globals.LinkClick(strFileID, PortalSettings.ActiveTab.TabID, ModuleId))

Or:

Dim url As String = Common.Globals.LinkClick(strFileID, PortalSettings.ActiveTab.TabID, ModuleId)
url = Page.ResolveUrl(url)

Will Strohl

Upendo Ventures Upendo Ventures
DNN experts since 2003
Official provider of the Hotcakes Commerce Cloud and SLA support
 
New Post
11/20/2007 5:00 PM
 

Will,

Thanks for the suggestions, I tried them all and no luck. I even tried prepending a ~ in front of the url before page.resolve(...) and it gave me /dnn/dnn/....

I should mention that I am using VS2005 with DNN V4.5.05

As a sidenote, I made a link in the Link Module pointing to the same file....when I inspect the url it has it does get the http://localhost/... right.  I haven't delved into the source code of the links module yet, do you have any idea where that url is being set? thanks in advance.

 

Paul

 
New Post
11/20/2007 5:07 PM
 

Well, the forum listing shows that you have replied, but the thread doesn't show your post yet.  (No doubt one of the new bugs in the forum.)  So I am posting this to see if your reply shows up.  Please disregard this.


Will Strohl

Upendo Ventures Upendo Ventures
DNN experts since 2003
Official provider of the Hotcakes Commerce Cloud and SLA support
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0How to get a complete URL to a file?How to get a complete URL to a file?


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