本文介绍了如何在asp core 1.0中查看当前的url的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在以前的asp版本中,我们可以使用
In previous versions of asp, we could use
@Request.Url.AbsoluteUri不过好像变了.我们如何在 asp core 1.0 中做到这一点?
But it seems it's changed. How can we do that in asp core 1.0?
推荐答案必须分别获取主机和路径.
You have to get the host and path separately.
@Context.Request.Host @Context.Request.Path更多推荐
如何在asp.net core 1.0中查看当前的url
发布评论