How to add a Webslice
Cursul oficial BNR
It is very nice and user-friendly to have Webslices on your website. It improves the user experience by allowing visitors to be up to date with the latest content that you provide, assuming that it is fitted to this presentation style. Since my BNR exchange rates page was this kind, I pursued in adding a Webslice especially for it.
Adding a webslice to your website is simple. After you read the main specifications or my previous article, you’ll understand the concept behind: first you signal to the browser that you have a special part of your website by setting to a container element the class “hslice”:
<div id="BNRExchange" class="hslice"> <div style="display: none" class="entry-title"> <img id="image" alt="Radu Poenaru's weblog gives you BNR Exchange rates" src="http://www.radupoenaru.com/bnr/images/radupoenaru.jpg" width="128" height="128" /> <p> Cursul oficial BNR </p> </div> <p> <a style="display: none" href="http://www.radupoenaru.com/bnr/bnr.php" rel="entry-content"> <a style="display: none" href="http://www.radupoenaru.com/bnr/bnr.php" rel="Bookmark" target="_blank"> <span style="display: none" class="ttl">5</span> </p> <div id="updateTrigger" class="entry-content" runat="server" /> ........ your content that you want surrounded by the green webslice part .............. </div>
The id of the container must be the same for all the container who contain the same information – as in my case, the graph of the exchange rates must have the same Id on every page.
Then you have to specific the refresh period of the page by using the ttl class, set at 5 minutes intervals in my case.
Another very interesting thing on this technology is that you can surround content with it, making clear to the user what he will use if he wants that Webslice’s content.
- Master thesis – Implementation of Repositories
- SharePoint 2010 – a technical overview for software developer
- My first day at CeBIT
- Microsoft SQL Server 2008 R2 – a business overview for software developer
- Adding new Social icons to the Mystique theme
- 7 easy steps to use Webmatrix and WordPress local development
- How to Consolidate 2 Microsoft Certified Professional IDs
- How to add Syntax Highlight to WordPress
- Add Silverlight to WordPress
- Create a simple HTML .MOV player