|
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.
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...