p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 (http://p2p.wrox.com/forumdisplay.php?f=264)
-   -   Show small image of products in RssReader (http://p2p.wrox.com/showthread.php?t=57780)

Caster May 11th, 2007 10:46 AM

Show small image of products in RssReader
 
I’d like to show the SmallImage of product at GetProductsRss.
How can I do ?



Asp.Net May 29th, 2007 01:07 AM



Hey Caster!
I don't know what you trying to achieve exactly.
But i Did something in my website that Shows an RSS feed from Microsoft.com
So I did some research On this Topic.
This exapmple explains how to receive the rss feed from a remote website, and be able to display an images within it.
So once you see it you will understand what i'm talking about.
In general, before you going check out my website with the explanation, keep in mind tha this DataList Control-GridView control receives Information that comming from XML file. Yes in general RSS feed is a simple XML file, with e few attributes whithin it.
So there's a node stuff going on.
<GeneralNode>
<Subnode>SomeInfoHere</Subnode>
<ImageNode>Http://aspspide.biz/Myback.jpg</ImageNode>
</GeneralNode>

So now basicaly once youu have a node with the URL to the image

You will probably
Build some DataListCintrol to show this Info.
It might be something like this:
<asp:Datalist Id ="DataList1" runat ="server">

<itemTemplate>
<!-He you can Put whatever you want--->
htm Tables Divs and so on..
Lets say wi have a table
<table>
<tr>
    <td>

        

     <img src ="<% # XPath(ImageNode)%>" />



    <a href = <%# XPath("comments/url") %> target ="_blank" ><img src = <%# XPath("ImageNode") %> border ="0" /></a>



<a href = "Your Url Go's here" target ="_blank" ><img src = <%# XPath("ImageNode") %> border ="0" /></a>


     </td>
</tr>
</table
</itemTemplate>
</asp:DataList>

Well suppose this is a simple DataList Control
But in many cases it will work with a few main Controls.
To make this Work you will need the following stuff.

You will need the XmlDtaSourceControl
DataListControl, and maybe some XSLT file.
Refer to my example to understand the concept.
I tried to explain this as simple as I could.
So this is a first example that shows how to consume rss feed trom Local file/ And also explains how to put things together.
If you want, you can navigate to the second example, that shows how you can consume RSS feed with the images from Microsoft Website.
I suggest you to start from the first one, to get more clear understanding of how this builded from the inside. It's pretty simple to do, but It took me Month and a half to understand how to put things together, to achieve this result.

Finally You can check the exact same Example but using GridView Control.


All times are GMT -4. The time now is 10:19 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.