How to get PostID

rated by 0 users
This post has 2 Replies | 1 Follower

RoelAlblas
Top 200 Contributor
Posts 101
Points 1,225
By: RoelAlblas
Posted: Wed, Jul 2 2008 2:37 PM

Hi,

I'm using PostAttachments.GetPostAttachtment(23).Url to get the url of a file I uploaded in the mediagallery. The problem is that they don't know the ID but they do know the Friendly Name. So I like to use something like PostAttachments.GetPostAttachtment(FRIENDLY-NAME).Url. Does someone knows a good conversion from the integer PostID to the string FRIENDLY-NAME?

Thanks!

Roel

 

 

 

 
  • Post Points: 5 |
RoelAlblas
Top 200 Contributor
Posts 101
Points 1,225
By: RoelAlblas
Posted: Fri, Jul 4 2008 3:01 PM In reply to

Hi,

I get the FriendlyFilename by

Dim objFriendlyFN As Object = PostAttachments.GetPostAttachtment(postID).FriendlyFileName

and fill a Dropdownlist with

DropDownList1.Items.Add(objFriendlyFN.ToString)

I set the postID hardcoded by eg Dim PostID As Integer = 26 to test and it works! Now I like to get all the files uploaded in a mediagroup. How can I make this work?

Thanks for the help!

Roel

 

 
  • Post Points: 5 |
RoelAlblas
Top 200 Contributor
Posts 101
Points 1,225
By: RoelAlblas
Posted: Sat, Jul 5 2008 5:28 PM In reply to

Querying the databse solved my problem!

Roel

 

 
  • Post Points: 5 |
Page 1 of 1 (3 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com