Solved

insert to sql database from asax

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

757 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now