Click here to Skip to main content
Click here to Skip to main content
Articles » Web Development » ASP.NET » General » Downloads
Add your own
alternative version

Page Tracking in ASP.NET

, 23 Jun 2004
This articles explains how to track visitors to your web site.
using System;
using System.Configuration;
using System.Net;
using System.IO;
using System.Web.Mail;

namespace EAD.Utility
	/// <summary>
	/// Summary description for EADUtility.
	/// </summary>
	public class EADUtility
		public EADUtility()

		public static void SendMail(string mailSubject, string mailMessage)
			string smtp = ConfigurationSettings.AppSettings["SmtpServer"];
			string mailFrom = ConfigurationSettings.AppSettings["MailFrom"];
			string mailTo = ConfigurationSettings.AppSettings["MailTo"];
			if (smtp == null || smtp.Length == 0 || mailFrom == null || mailFrom.Length == 0 || mailTo == null || mailTo.Length == 0)
				// Publish Message in log
				MailMessage mail = new MailMessage();
				mail.To = mailTo; 
				mail.From = mailFrom; 
				mail.Subject = mailSubject; 
				mail.BodyFormat = MailFormat.Html; 
				mail.Body = mailMessage;
				SmtpMail.SmtpServer = smtp; 
			catch(Exception e)
				string message = e.Message;
				// Publish Exception

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Web Developer
United States United States
Vikram is an Enterprise Application Architect specializing in EAI, ETL, all relational databases and transforming legacy applications to Microsoft .Net environment. Vikram works for a consulting firm in Research Triangle Park, NC. Vikram has expertise in all relational databases, Cobol, mainframe, OO programming, C, Perl and Linux. C# is a newfound craze for Vikram.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150327.1 | Last Updated 24 Jun 2004
Article Copyright 2004 by vikramk
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid