Solved

Capturing Clicked Links from my ASP page

Posted on 2013-01-09
1
203 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 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

10 Experts available now in Live!

Get 1:1 Help Now