C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Getting the number of visitors of a website


Posted Date: 18 Aug 2008    Resource Type: Code Snippets    Category: ASP.NET WebForms
Author: roopeshMember Level: Silver    
Rating: Points: 5



For getting the number of visitors in a web site,we have to include these codes in global.asax file.We should first initialise int=0 before Application start


In Application start

count=0;
Application["mycount"]=count;


In Session start

count = Convert.ToInt32(Application["mycount"]);
Application["mycount"] = count + 1;




Responses

Author: pradipta    18 Aug 2008Member Level: Gold   Points : 1
Dont you think a Static variable(count) of type Integer is a better option than Application variable.If you use static variable then you need not have to do a typecast to get the count.


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Number of visotors  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Show video like you tube in asp.net page
Previous Resource: Data from database into a Excel Sheet
Return to Discussion Resource Index
Post New Resource
Category: ASP.NET WebForms


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use