Click here to Skip to main content
15,896,207 members
Articles / Web Development / CSS

An XML Based (we)blog with RSS Feed

Rate me:
Please Sign up or sign in to vote.
4.59/5 (18 votes)
7 Jul 20038 min read 403.4K   2.3K   111  
A BLOG tool ready to use. Post weblogs to an XML file from a windows application via Web Service. Uses SOAP Headers for authentication. Uses simple XSL Transformation for the RSS feed.
Public Class Item
    Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    End Sub

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN: This method call is required by the Web Form Designer
        'Do not modify it using the code editor.
        InitializeComponent()
    End Sub

#End Region

    Protected Title As String
    Protected Body As String

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Dim itemFilter As String
        If Not Request("id") = String.Empty Then
            itemFilter = Request("id")

            Dim dsWebLog As DataSet
            'get our cached dataset
            dsWebLog = XmlHelper.GetDS()

            'get a dataview from a copy of the cached dataset
            Dim dvWeblog As DataView = dsWebLog.Copy.Tables(0).DefaultView

            'filter on guid
            dvWeblog.RowFilter = "id = '" & itemFilter & "'"

            'get it out
            If dvWeblog.Count > 0 Then
                Title = dvWeblog(0).Item("logtitle").ToString
                Body = dvWeblog(0).Item("logtext").ToString
            End If
        End If
    End Sub

End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


Written By
Web Developer
Sweden Sweden
Johan started coding a long time ago on a ZX Spectrum and the Z80 processor. His parents were rather sceptical about him sitting up all night coding and playing Manic Miner but they don't regret buying that computer now, since it turned out pretty good in the end.
Johan is now working as a Systems Architect and jump between a number of different platforms and computer languages every day. He wouldn’t cope if it weren’t for IntelliSense and code completion...

Comments and Discussions