?
Solved

Capturing Clicked Links from my ASP page

Posted on 2013-01-09
1
Medium Priority
?
223 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 18

Accepted Solution

by:
Rajar Ahmed earned 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month8 days, 13 hours left to enroll

764 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