Is there a way to modify this line of code to be able to show a list of images from my Photobucket folder and not the images on my server Dim dir
AsNew DirectoryInfo(MapPath("~/images"))
If you want a list of the images in your Photobucket "folder", you need to see if Photobucket provides an API that gives you access to that information.
Photobucket does provide an API but there is such little documentation that i cant see how to use it
Cant even find a good example thats why i asked the question here
Photobucket does provide an API but there is such little documentation that i cant see how to use it
Cant even find a good example thats why i asked the question here
var xml = XDocument.Load("http://feed1070.photobucket.com/albums/f83/bigshop69/1-test/feed.rss");
var images = xml.Descendants("guid").ToList();
foreach(var image in images){
// do something with image.Value
}
[EDIT]
Sorry - just noticed that you are using VB:
Dim list = New List(Of String)()
Dim xml = XDocument.Load("http://feed1070.photobucket.com/albums/f83/bigshop69/1-test/feed.rss")
Dim images = xml.Descendants("guid").ToList()
For Each image In images
list.Add(image.Value)
Next
I have some code simular to the code you supplied above loading a list of image files local on my local computer
Using the XML example you supplied could we modify the code below to show the list of images that your example returns
With this layout below im able to pull a list of images from my local computer, display them at 100 x 100 but if i drag and drop an image to my local computer it comes in at the full size of the original file
Is there any way to get that with the layout you have provided
What im trying to create is a thumbnail viewer of images on my Photobucket account that allows me to view them as thumbnails but drag and drop them full size
bigshop
Member
41 Points
75 Posts
Photobucket Image Collection
Nov 25, 2012 10:58 PM|LINK
I have followed the code in this example and can show a list of images in an /image folder on my computer
http://forums.asp.net/t/1110308.aspx/1
Is there a way to modify this line of code to be able to show a list of images from my Photobucket folder and not the images on my server
Dim dir As New DirectoryInfo(MapPath("~/images"))
My Photobucket folder
http://s1070.photobucket.com/albums/u489/bigshop69/1-test/
Mikesdotnett...
All-Star
155611 Points
19983 Posts
Moderator
MVP
Re: Photobucket Image Collection
Nov 26, 2012 04:59 AM|LINK
If you want a list of the images in your Photobucket "folder", you need to see if Photobucket provides an API that gives you access to that information.
Web Pages CMS | My Site | Twitter
bigshop
Member
41 Points
75 Posts
Re: Photobucket Image Collection
Nov 26, 2012 05:12 AM|LINK
Photobucket does provide an API but there is such little documentation that i cant see how to use it
Cant even find a good example thats why i asked the question here
geniusvishal
All-Star
15163 Points
2953 Posts
Re: Photobucket Image Collection
Nov 26, 2012 05:38 AM|LINK
You can start from here:
http://stackoverflow.com/questions/10478353/how-to-use-api-using-asp-net-c
https://bitbucket.org/photobucket/api-dotnet/changeset/179816cef52b
Then Refer this thread as well:
http://stackoverflow.com/questions/10416367/getting-error-in-using-photobucket-api-using-c
My Website
www.dotnetvishal.com
Mikesdotnett...
All-Star
155611 Points
19983 Posts
Moderator
MVP
Re: Photobucket Image Collection
Nov 26, 2012 06:42 AM|LINK
Here is the RSS feed for your album: http://feed1070.photobucket.com/albums/f83/bigshop69/1-test/feed.rss. (See documentation: http://pic.pbsrc.com/dev_help/RSS/Photobucket_RSS_Feeds.htm)
You can query that using Linq to XML:
var xml = XDocument.Load("http://feed1070.photobucket.com/albums/f83/bigshop69/1-test/feed.rss"); var images = xml.Descendants("guid").ToList(); foreach(var image in images){ // do something with image.Value }[EDIT]
Sorry - just noticed that you are using VB:
Dim list = New List(Of String)() Dim xml = XDocument.Load("http://feed1070.photobucket.com/albums/f83/bigshop69/1-test/feed.rss") Dim images = xml.Descendants("guid").ToList() For Each image In images list.Add(image.Value) NextWeb Pages CMS | My Site | Twitter
bigshop
Member
41 Points
75 Posts
Re: Photobucket Image Collection
Nov 27, 2012 09:59 PM|LINK
Hi Mike
I have some code simular to the code you supplied above loading a list of image files local on my local computer
Using the XML example you supplied could we modify the code below to show the list of images that your example returns
DataList1.DataSource = list
DataList1.DataBind()
<asp:DataList ID="DataList1" runat="server" RepeatColumns="5" CellPadding="5">
<ItemTemplate>
<asp:Image Width="100" ID="Image1" ImageUrl='<%# Bind("Name", "~/images/{0}") %>' runat="server" />
<br />
<asp:HyperLink ID="HyperLink1" Text='<%# Bind("Name") %>' NavigateUrl='<%# Bind("Name", "~/images/{0}") %>' runat="server"/>
</ItemTemplate>
<ItemStyle BorderColor="Silver" BorderStyle="Dotted" BorderWidth="1px" HorizontalAlign="Center" VerticalAlign="Bottom" />
</asp:DataList>
Mikesdotnett...
All-Star
155611 Points
19983 Posts
Moderator
MVP
Re: Photobucket Image Collection
Nov 28, 2012 04:55 AM|LINK
You just need to refer to the Container.DataItem:
Put the other two lines in your Page_Load event in code-behind.
Web Pages CMS | My Site | Twitter
bigshop
Member
41 Points
75 Posts
Re: Photobucket Image Collection
Nov 28, 2012 07:15 PM|LINK
Mike that works well - thanks
With this layout below im able to pull a list of images from my local computer, display them at 100 x 100 but if i drag and drop an image to my local computer it comes in at the full size of the original file
Is there any way to get that with the layout you have provided
What im trying to create is a thumbnail viewer of images on my Photobucket account that allows me to view them as thumbnails but drag and drop them full size
<asp:DataList ID="DataList1" runat="server" RepeatColumns="5" CellPadding="5">
< ItemTemplate>
< asp:Image Width="100" ID="Image1" ImageUrl='<%# Bind("Name", "~/images/{0}") %>' runat="server" />
< br />
< asp:HyperLink ID="HyperLink1" Text='<%# Bind("Name") %>' NavigateUrl='<%# Bind("Name", "~/images/{0}") %>' runat="server"/> < /ItemTemplate>
< ItemStyle BorderColor="Silver" BorderStyle="Dotted" BorderWidth="1px" HorizontalAlign="Center" VerticalAlign="Bottom" /> < /asp:DataList>