To get the recent user number in ASP.Net using c# follow the below steps.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Globalization;
public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
int a;
a = Convert.ToInt32((Application["user_Count"]));
Label1.Text = Convert.ToString(a);
if (a < 10)
Label1.Text = "000" + Label1.Text;
else if (a < 100)
Label1.Text = "00" + Label1.Text;
else if (a < 1000)
Label1.Text = "0" + Label1.Text; } }
Output