IE8 Web Slices Settings, Get Notified upon changes

We are sure that everyone who is using IE8 must be playing around a lot with Web Slices, there are various Slices available on the ieaddons.com and You can connect with your favorite websites through them.

We can place a few quick settings for our Web Slices in Internet Explorer 8 which shall be helpful in seeking regular updates through them and being notified when changes are occurred so that the small chunk of a web page of a real time integration of online services should start carry its true meaning.

In the Internet Options in your IE8, Select the Content Tab you will see the option for Feeds and Web Slices click on the settings button next to it and a new window will open. Here in this new window you can place the appropriate settings as in when do you want your slices to be updated, like i have choosen every 15 mins which is the minimum value or check the Advanceed options like Play sound when it finds or update a slice or turn on slice discovery etc.

Your slices will work the way you set them to.

Create IE8 Webslice for Google Blogger (Blogspot)

Internet Explorer 8 is the most innovative browser we ever had. Web Slicing is one of the key developer feature introduced in IE8. One can find lot of examples on building dynamic Web Slices. However this code will let the Blogger (blogspot) users to create an IE8 Web Slice for thier Blogs.

CODE****

Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Text
Imports Google.GData.Client
Imports System.Net
Imports System.Xml
Imports System.Text.RegularExpressions

Partial Class _Default
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim query As New FeedQuery
Dim feed As AtomFeed
feed = Nothing
Dim Service As New Service(“_Default”, “IE8-Addons”)
query.Uri = New Uri(“http://www.blogger.com/feeds/XXXXXXX/posts/default?max-results=3?”)
feed = Service.Query(query)
Dim htm As String
Dim itr As String
Dim Slice As String
For Each AtomEntry In feed.Entries
itr = itr & “<a href=” & AtomEntry.AlternateUri.ToString & “> ” & AtomEntry.Title.Text.ToString & “</a></br></br>”
Next
Slice = “<div id=1> <h2-title>My Blog Title</h2> <div-content> <abbr title=15></abbr>”
htm = “<html><head><title>My Blog Title</title></head><body>” & Slice & itr & “</div></div></body></html>”
Response.Write(htm)
End Sub
End Class

*** END OF CODE

The example disscues on how to create a WebSlice for Blogger(Blogspot). You are required to do the following steps:-

1) Use the Above Given VB.NET Code

2) Download the Google Library for Blogger

3) In the VB.NET You are required to make the following changes:-

3a) Dim Service As New Service(“Default”, “IE8-Addons”) (Default is the name of my class; IE8-Addons is the name for the Website Project) – Replace as per requirement.

3b) Replace Your BlogId Number with mine (XXXXXXX) in the “http://www.blogger.com/feeds/XXXXXXX/posts/default?max-results=3?”

3c) Replace My Blog Title (String) in the code with Your Web Slice / Blog Title.

This is a simple code to create WebSlice for Blogger, It uses Google API for Blogger, specifically the DLL uploaded. It Create’s a Service Object and Queries for Feed specifying the particular Blog using ID and fetching records as per record. The the later lines generate HTML for the WebSlice and concats the Last three Blog Posts titles and giving the Hyperlink to their specific URLs.