Solved

Capturing Clicked Links from my ASP page

Posted on 2013-01-09
1
206 Views
Last Modified: 2013-01-10
Hi,
I am working on this ASP application and I would like to find a way to capture a clicked link from a page. Let say, I have page A and page B, somebody clicks on a link on page A that directs them to page B. However, I would like to be able to display in a label on page B the link of Page A where the click originated from.

Illustration:

http://abc.com
http://xyz.com

when
0
Comment
Question by:snazaire
1 Comment
 
LVL 18

Accepted Solution

by:
Rajar Ahmed earned 500 total points
ID: 38759680
Try this,
Aspx:
<asp:Label ID="backurl"  runat="server" >Back</asp:Label>

Open in new window


    protected void Page_Load(object sender, EventArgs e)
    {

        backurl.Text = "";
        if (Request.UrlReferrer != null)
        {
            
            backurl.Text = "<a href='" + Request.UrlReferrer.ToString() + "'>" + Request.UrlReferrer.ToString() + "</a>";
            
        }
    }

Open in new window

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now