troubleshooting Question

Making a global back button in a web control

Avatar of nkewney
nkewneyFlag for United Kingdom of Great Britain and Northern Ireland asked on
.NET ProgrammingASP.NETVisual Basic.NET
5 Comments1 Solution206 ViewsLast Modified:
Dear Experts,

I'm trying to make a global 'back' button for my site.

I looked at this article, which seemed very useful (but is in c#)
http://codebetter.com/blogs/peter.van.ooijen/archive/2005/07/19/129384.aspx

I tried to convert it into VB.NET, but it's crashing every time I try to run it (included in my main project)

I'm getting a few warnings (overloads warnings), so that might have something to do with it. Can anybody suggest?

Thanks

NIck

Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Text
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
<ToolboxData("<{0}:GlobalBack runat=server></{0}:GlobalBack>")> _
Public Class GlobalBack
    Inherits HyperLink
    Private Sub GlobalBack_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            Me.NavigateUrl = Page.Request.UrlReferrer.AbsoluteUri
            Me.OnLoad(e)
        End If
    End Sub
    <Browsable(False)> Public Overloads Property NavigateUrl() As String
        Get
            Return Me.NavigateUrl
        End Get

        Set(ByVal Value As String)

            'nothing

        End Set
    End Property

End Class
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros