mvc combine url dynamically c#

I was working to send a password re-set email to user and wanted to to create a URL dynamically i.e It should be including the http or https and wwww and domain name and application name and then the URL defined by my self.
I created as follow which seems very clean way to do that and without writing number of lines
var passwordResetUrl = new Uri(Request.Url, string.Format(“{0}?id={1}”, Url.Action(“ResetPassword”, “Account”), encryptedTicket));


Comments are closed.