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#)

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?



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
        End If
    End Sub
    <Browsable(False)> Public Overloads Property NavigateUrl() As String
            Return Me.NavigateUrl
        End Get

        Set(ByVal Value As String)


        End Set
    End Property

End Class
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