I have to put Facebook code for three distinct pages inside my program (videoWall.aspx, videoWallDetail.aspx, and get-involved.aspx). In the head I will put the code and change it as I need to using an if statement, checking against the page to see which code should be used.
How do I get the page url or path or anything I can use to get a hold of the unique page?
Here is my code:
// if(page = videoWall.aspx)
<meta property="og:title" content="Faces of Metastatic Breast Cancer (MBC) Video Wall" />
<meta property="og:type" content="cause" />
<meta property="og:image" content="http://www.facesofmbc.org/images/MBC_Logo.png"/>
<meta property="og:url" content="http://bit.ly/rkRwzx" />
<meta property="og:site_name" content="Faces of Metastatic Breast Cancer (MBC)" />
<meta property="og:description" content="I just viewed the new Faces of Metastatic Breast Cancer (MBC) video wall. For each view, comment or share of the video wall during October, Genentech will donate $1 to MBC initiatives. Watch TODAY!" />
<meta property="fb:admins" content="653936690"/>
Obviously I know the if won’t work like that, but that is just an example of what i want to do, then repeat for the other two instances.
Thanks in advance!
Page.Request.Url.ToString() will show you the entrie url…
you can use
Page.Request.Url.ToString().Split(‘?’)[0] to see just de page…