How do I get the Controller and Action names from the Referrer Uri?

前端 未结 9 1055
清歌不尽
清歌不尽 2020-12-01 14:06

There\'s a lot of information for building Uris from Controller and Action names, but how can I do this the other way around?

Basically, all I\'m trying to achieve i

9条回答
  •  甜味超标
    2020-12-01 14:45

    Why would you need to construct ActionLink from a url ? The purpose of ActionLink is just the opposite to make a url from some data. So in your page just do:

    var fullUrl = Request.UrlReferrer.ToString();
    Back
    

提交回复
热议问题