Use Html.ActionLink("Link Title", "Action", "Controller")
To generate a full link use:
@Html.ActionLink("Link Title", "Action", "Controller", "http", "www.mysampledomain.com",
"_blank", new {id = paramValue}, new { @class="someClass" })
That is the extension overload with all the parameters you can specify. Have a look at this MSDN article http://msdn.microsoft.com/en-us/library/dd492938.aspx
To generate from Controller use this code:
var url = UrlHelper.GenerateUrl(null, "MyAction", "MyController", "http", "www.mydomain.com", String.Empty, null, RouteTable.Routes, this.ControllerContext.RequestContext, false);
url variable will contain a string representation of your URL. You can store it in ViewBag like:
ViewBag.MyUrl = UrlHelper.GenerateUrl(null, "MyAction", "MyController", "http", "www.mydomain.com", String.Empty, null, RouteTable.Routes,
this.ControllerContext.RequestContext, false);
From View call it as:
@ViewBag.MyUrl
That should be it.