Solved

insert to sql database from asax

Posted on 2006-11-12
2
235 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…

856 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