4

How can we get Current Page URL in F#, Websharper.

e.g we do it in c#

string PageUrl = Request.Url.ToString();

It is very simple for expert people i just want to get current page url with querystring complete url

> e.g. http://localhost:58496/default.aspx?id=434
Jawad Siddiqui
  • 195
  • 1
  • 1
  • 15
  • do you want to get this on the server or on the client side? On the server-site it's just `System.Web.HttpContext.Current.Request.Url` (just like in C# ;) ) - on the client side you could use `window.location` (see this question: https://stackoverflow.com/questions/22406680/how-to-interact-and-set-dom-properties-with-websharper) – Random Dev Oct 29 '14 at 18:04
  • It's worth noting that MVC maps some of the `HttpContext.Current` properties to the `Controller` base class. – Christopher Stevenson Oct 29 '14 at 18:37
  • @CarstenKönig your method working properly. – Jawad Siddiqui Oct 29 '14 at 21:02

0 Answers0