Introduction

This article will explain the code to get the total visitors count of Asp.Net MVC website using Application variable.

Step 1

Step 2

If you want to show the total visitors count on all the pages then use Layout.cshtml or the page/view where you want to show the total count put the below code.

<p>Total Number of visitors: @ApplicationInstance.Application["Totaluser"]</p>