.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

How to display curent date and time and also visitors counting

Posted By: mohan     Posted Date: November 30, 2010    Points:2   Category :ASP.Net
hi i am creating web site using C# and Sql server-2005. in this i have visitors counting and date and time it is displayed in top of the corner give me c# code and idea

Author: Jean Paul             
Posted Date: November 30, 2010     Points: 5   

For getting time, you have to register a custom field on submit - that will give you the client date/time.
Please refer: http://weblogs.asp.net/mikebosch/archive/2007/11/15/getting-the-client-browsers-date-and-time-with-asp-net.aspx

For getting the user count, you can use the Application object.
Get the value from Application["VisitorCount"], convert it into integer,
increment and set it back. You should take care of null conditions too.

Jean Paul http://jeanpaulva.com/

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend