易截截图软件、单文件、免安装、纯绿色、仅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动态加载用户自定义控件,并转换成HTML代码

Ajax现在已经是相当流行的技术了,Ajax不仅是想服务器端发送消息,更重要的是无刷新的重载页面。
 如果页面单纯的使用js来创建,要写大量的代码,而且不直观。
在asp.net中,其实我们可以创建用户自定义控件,通过Ajax请求返回用户自定义控件HTML代码。
public static string RangerUsControl(string controlName) ......

asp.net 制作安装包并自动安装SQL数据库

一).创建部署项目    
  1.   在“文件”菜单上指向“添加项目”,然后选择“新建项目”。    
  2.   在“添加新项目”对话框中,选择“项目类型”窗格中的“安装和部署项目”,然后选择“模板”窗格 ......

ASP.net 4.0 针对SEO的改进

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

Mix 10 上的asp.net mvc 2的相关Session

Beyond File | New Company: from Cheesy Sample to Social Platform Scott Hanselman in Lagoon L on Monday at 11:30 AM The web has changed and there's a new way of thinking about your applications. You can't just write some HTML and CSS anymore and expect to be the next Twitter. Hear h ......

在 vs2008为asp.net ajax添加js智能感知


vs2008为asp.net ajax添加js智能感知



今天找了好久,终于搞清楚了,scriptManager控件支持js智能感知,而从其继承的toolkitScriptManager不支持。至少在
vs2008b2中是这样。
要在js文件中添加asp.net ajax的js智能感知(与scriptManager控件无关),在js文件的开头添加这样一行即可:
//
/<referen ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号