Solved

insert to sql database from asax

Posted on 2006-11-12
2
234 Views
Last Modified: 2009-12-16
I want to try to count the number of open sessions on my site. What I hope to do is insert to a sql database from the global.asax file and add 1 to the database field "sessions" on session start in the global.asax and then subtract 1 when the session ends. my problem is that I dont know how to put the "using System.Data.SqlClient;" into the global.asax file so that I can do an insert to the database. I know its pobably a dumb qusetion, but I'm new and trying to learn. Im using VWD 2005 Express with c# code bechind and SQL server 2005 Express on a IIS 6.0 server. Thanks for your help.
 
0
Comment
Question by:cbrick04
2 Comments
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 17929415
<%@ Import Namespace="System.Data.SqlClient" %>

Bob
0
 

Author Comment

by:cbrick04
ID: 17935943
Thats exacctly what I needed , Thanks ,
                                                     Bill
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Name space syntax error 12 59
Error on Add method 1 51
Help with C#, MVC, razor. 6 35
Initial get page response times and IIS8 15 51
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question