易截截图软件、单文件、免安装、纯绿色、仅160KB

Online active users counter in ASP.NET


Online active users counter in ASP.NET
With this tool which is written for ASP.NET, it is possible to count the number of online users, members and guest users in web sites.
Installation
The tool installation is very simple and only takes a few minutes.
Step one - Add Reference:
After downloading the attachment, you should add a reference to the project. If you know how to add references please skip this step.
To add the reference, right click on your solution and select "Add Reference" from the menu. Then select the "OnlineActiveUsers.dll" file. Now the reference is added to the solution.
Step two - Change configuration:
Open the "Web.config" file from your project (If this file is absent, right click on your project and from "Add new item", select "Web configuration file"). Then add this code on "web.config" file.
<httpModules>
<add name="OnlineActiveUsers" type="OnlineActiveUsers.OnlineUsersModule"/>
</httpModules>
Note that this code should be placed between "system.web" tags.
Step three - Add some code to global.asax:
Open the "global.asax" file in your project (If this file is absent, right click on your project and from "Add new item", select "Global Application Class"). In the "session_end" event add this code:
OnlineActiveUsers.OnlineUsersInstance.OnlineUsers.UpdateForUserLeave()
If the project is C# the result should be like this:
void Session_End(object sender, EventArgs e)
{
OnlineActiveUsers.OnlineUsersInstance.OnlineUsers.UpdateForUserLeave();
}
After now the tool will count user statistics.
Step four - Access the statics:
To get the statistics, refer to "OnlineActiveUsers.OnlineUsersInstance.OnlineUsers" variable.
Here are some of its important properties:
UsersCount: the number of all online users.
GuestUsersCount: the number of online guest users. This property works only if you have used SetUserOffline and SetUserOnline methods. These methods are explained below.
RegistredUsersCount: the number


相关文档:

在asp.net中怎样跳转框架

我有一个login.aspx的页面,假如登录成功后就会自动跳转到index.html的框架. 
index.html有三个页面,top.aspx,left.aspx,main.aspx,然后left.aspx里面显示用户信息 
假如在left.aspx里没有Session的话,会返回login.aspx页面,而不显示index.html页面里的任何一页. 
我现在的情况是没有Session的时候还是在i ......

ASP.NET MVC 2的代码以MS PL协议开源发布

微软已经宣布ASP.NET MVC 2的代码以MS-PL协议发布,MS-PL是一个得到OSI认证的开源协议,ASP.NET MVC基于MS-PL发布,是一个真正的开源框架且没有任何平台限制,也就是说,您可以在mono下使用或开发ASP.NET MVC的相关项目。 可以到ASP.NET MVC 2 RTM Download Details page获取源代码,或者到CodePlex上获取,这个页面是微软官 ......

C# asp.net如何使用MD5加密,解密

using System;
using System.Collections.Generic;
using System.Text;
using System.Security.Cryptography;namespace md5
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(UserMd5("8"));
Console.WriteLine(GetMd5Str("8"));
}
/**//// &lt;summary&gt;
/// MD5 16位加密 ......

ASP.net 4.0 针对SEO的改进

搜索引擎优化对任何面向公众的网站来说都非常重要,ASP.net 4.0 为此就做了大量改造。这些改进包括如下: 301永久性重定向 随着时间的迁移,网站的一些页面地址会发生变化,这会导致搜索引擎收录的链接地址、用户收藏的地址失效。Response.Redirect() 就是解决这个问题的。但是Response.Redirect 有以下问题: Response. ......

asp.net 中 request 与 context.request有什么区别?

Request 属性提供对 HttpRequest 类的属性和方法的编程访问。由于 ASP.NET 页包含对 System.Web 命名空间(含有 HttpContext 类)的默认引用,因此在 .aspx 页上可以引用 HttpContext 的成员,而不需要对 HttpContext 的完全限定类引用。例如,可只使用 Request.Browser 获取客户端浏览器的功能。但是,如果要从 ASP.NET 代 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号