Exemplo n.º 1
0
        private string FormatIPForDetails(IPViewModel x)
        {
            string url_ip     = Url.Action("View", "IP", new { Id = x._id });
            string url_voicer = Url.Action("Details", "User", new { Id = x._user_id });

            return("<i class='fa fa-share-alt'></i>&nbsp;" + "<a href='" + url_ip + "' title=" + x._title + "' class='link-text'>" + Extension.Truncate(x._title, 20) +
                   "</a>&nbsp;by<a href='" + url_voicer + "' class='link-text'>&nbsp;" + Extension.Truncate(x._voicer, 10) + "</a>&nbsp;<small>" + x._time_ago + "</small>");
        }
Exemplo n.º 2
0
        public IActionResult ShowIP()
        {
            string remoteIP = getIpAddress.RemoteIP();

            var model = new IPViewModel { IPAddress = remoteIP };

            return View(model);
        }