views:

62

answers:

1

Here is a code sample:

myMaster.Master

<asp:LinkButton runat="server" OnClick="anAction_Click">

calls:

myMaster.Master.cs

protected void anAction_Click(object sender, EventArgs e)
        {
            ???
            Request.getUrlOfThePageCalling?
            ???
        }

I'm using a master page. How do I get the page that called this action?

+6  A: 

You were very close - try Request.Url like this:

this.Request.Url
Andrew Hare
thanks! I knew it was simple. By the way, what's the difference between .url and .urlReferrer ?
marcgg
UrlReferrer is the URI of the page that the user was previously on.
Andrew Hare
thanks for the help
marcgg
Not a problem! :)
Andrew Hare