Count the hit of website

Posted by Rupa490 under ASP.NET on 1/11/2017 | Points: 10 | Views : 1582 | Status : [Member] | Replies : 1
In my website i have to put different links of others website after clicking on these links separately count the hit of that visited sites how it is possible in asp .net ???????



Thanks in advanced....




Responses

Posted by: Sheonarayan on: 1/11/2017 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
You should maintain a database table for that in which you will store different links information like linkText, linkUrl, ViewCount etc.

On the website have a url something like
<a href="/showlink.aspx?linkid=1">Link1</a>

On showlink.aspx page retrieve the linkid querystring, go to the database and update the ViewCount = ViewCount+1 and then get the linkUrl value and then Response.Redirect to this url.

In this way, you would be able to count the hit to a particular links.

Hope this will help you.

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Rupa490, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response