Home > DeveloperSection > Forums > Geting current page url in mvc
Pravesh Singh
Pravesh Singh

Total Post:101

Points:709
Posted on    October-08-2014 12:28 AM

 ASP.NET MVC ASP.Net  ASP.NET MVC 
Ratings:


 1 Reply(s)
 567  View(s)
Rate this:

I am using the Facebook comments plugin on a blog I am building. It has some FBXML tags that are interpreted by the facebook javascript that is referenced on the page.

This all works fine, but I have to pass in the current, fully-qualified URL to the plugin.

<div style="width: 900px; margin: auto;">

    <div id="fb-root"></div>

    <fb:comments href="URL HERE" num_posts="10" width="900"></fb:comments>

</div>



Kamlakar Singh
Kamlakar Singh

Total Post:194

Points:1396
Posted on    October-08-2014 12:28 AM

You could use the Request.RawUrl, Request.Url.OriginalString, Request.Url.ToString() or Request.Url.AbsoluteUri.

Don't want to miss updates? Please click the below button!

Follow MindStick