|
Namespace Navigation
Public MustInherit Class NavigationProviderBase
#Region " MustInherit Methods "
Protected MustOverride Sub processNavigation()
#End Region
#Region " Properties "
Private _navigationParts As New Dictionary(Of String, String)
Friend Property NavigationParts() As Dictionary(Of String, String)
Get
Return _navigationParts
End Get
Set(ByVal value As Dictionary(Of String, String))
_navigationParts = value
End Set
End Property
Private _querystringParts As New Dictionary(Of String, Object)
Friend Property QuerystringParts() As Dictionary(Of String, Object)
Get
Return _querystringParts
End Get
Set(ByVal value As Dictionary(Of String, Object))
_querystringParts = value
End Set
End Property
Private _currentUrl As String
Public Property CurrentUrl() As String
Get
Return _currentUrl
End Get
Set(ByVal value As String)
_currentUrl = value
End Set
End Property
#End Region
#Region " Constructor "
Public Sub New()
Dim querystring As String = String.Empty
CurrentUrl = HttpContext.Current.Request.RawUrl
'Remove the domain and querystring information
If HttpContext.Current.Request.RawUrl.Contains("?") Then
CurrentUrl = HttpContext.Current.Request.RawUrl.Substring(0, CurrentUrl.IndexOf("?"))
End If
'Add the querystring values to the dictionary
processQuerystring()
End Sub
#End Region
#Region " Private Methods "
Private Sub processQuerystring()
'Convert the querstring items to an array
For Each key As String In HttpContext.Current.Request.QueryString.Keys
QuerystringParts.Add(key, HttpContext.Current.Request.QueryString(key))
Next
End Sub
#End Region
End Class
End Namespace
|
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.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.