Forum Moderators: open

Message Too Old, No Replies

Current URL of a Page

         

aaronjf

3:51 pm on May 15, 2008 (gmt 0)

10+ Year Member



Hope someone can help me with this basic question. In asp.NET how would I call the URL of a current page into a link on that page?

I am building a bar of icons so that users can submit a page to various other sites. Here is a snippet of what I am trying to do.

<a href="http://OTHERSITE.com/submit?url="http://www.CURRENTSITE.com/sompage.aspx&amp;title="CURRENT SITE" rel="nofollow" title="Digg"><img alt="Digg" height="16" src="/images/icons/icon-digg.png" width="16" border="0"/></a>

The code in bold being the URL of the page the user is currently on.

I know this is basic, but I am a CSS jokey not an ASP guy.

Response

4:46 pm on May 15, 2008 (gmt 0)

10+ Year Member



Try this for your URL (insert your domain):
<%= [domain string] & Request.LocalPath %>

[edited by: Response at 4:46 pm (utc) on May 15, 2008]