Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

How can I access the controller of _Layout.cshtml?

$
0
0

Recently, I have a project which needs to show the shop in the user's city in the footer of every page.

In my opinion, I will get the IP of the user, and get the IP location from some third-party API. For example, if the IP is from New York then shows the address of the New York shop.

I only can achieve this in the controller while there is no controller of _Layout.cshtml.

How can I solve this? Thank you.


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>