HitCounter 1

assaultkitty
assaultkitty used Ask the Experts™
on
I have to create a hitcounter in ASP.NET and C#.  The project request is that I create a HitCounter class that counts the number of hits to a Web page and stores the results in a database. Use a private data member to store the number of hits and include public set and get member functions to access the private counter member variable.  Save the project in a folder named Hit Counter in you Projects folder for Chapter 10.  

I have requested a little help on this homework.  I have received limited information on how to complete this program.  I have sent in what I have done but I have not received a response.  So, I will ask for help with this homework in increments.  I need to know how to set up a gridview with a set method and get methods.  You can provide me with examples on how to accomplish this issue.  Thank you.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
This is homework.
step 1:

"create a HitCounter class that counts the number of hits to a Web page and stores the results in a database. Use a private data member to store the number of hits and include public set and get member functions to access the private counter member variable."

can you do that much?
Top Expert 2015
Commented:
There's an excellent example of creating a private data member integer with set and get properties on this Microsoft site:

http://msdn.microsoft.com/en-us/library/65zdfbdt(v=vs.71).aspx

The complete example further down the page.

You should be able to pretty much use the C# code as written (ignore the Visual Basic parts) and maybe change the variable names if you care to.

Author

Commented:
Thank you tommyboy.  that is what I am talking about.  I cannot see an example like that in the book.  The other experts are refusing to help because the are afraid of giving the answer.  I am not asking for the answer.  Discuss the problem and give me something to reference is what I am asking. Thanks so much.

Author

Commented:
Thanks tommyboy!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial