i want to know the number of hits customers are viewing my website.give me the sample code.
Loading
i want to know the number of hits customers are viewing my website.give me the sample code.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Vijaya KadiyalaPosted Apr 21, 2008, 11:49 AM
Hi,
Instead of building your own why dont you check out the below link, its easy to integrate.
http://www.easycounter.com/FreeCounter3.html
Thanks -- Vj
Niradhip ChakrabortyPosted Apr 17, 2008, 2:54 PM
To make the thing simple. U can refer the following code.
protected void Page_Load(object sender, EventArgs e)
{
Application.Lock();
if(Application["HitCount"]!=null)
{
Application["HitCount"]=(int)Application["HitCount"]+1;
}
else
{
Application["HitCount"] =1;
}
Application.UnLock();
lblInfo.Text="The page has been accessed ("+Application["HitCount"].ToString()+") times";
}
ajay chigurupatiPosted Apr 16, 2008, 1:21 AM
Niradhip ChakrabortyPosted Apr 15, 2008, 2:54 PM
Check the URL please:
http://www.stardeveloper.com/articles/display.html?article=2002102501&page=1