易截截图软件、单文件、免安装、纯绿色、仅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


相关文档:

IIS7发布asp.net站点

HTTP Error 500.19 - Internal Server Error
一 首先解锁
配置错误: 不能在此路径中使用此配置节。如果在父级别上锁定了该节,便会出现这种情况。锁定是默认设置的(overrideModeDefault="Deny"),或者是通过包含 overrideMode="Deny" 或旧有的 allowOverride="false" 的位置标记明确设置的。
出现这个错误是因为 IIS 7.5 ......

ASP.NET快捷方式大全

快捷键 功能
CTRL + SHIFT + B生成解决方案
CTRL + F7 生成编译
CTRL + O 打开文件
CTRL + SHIFT + O打开项目
CTRL + SHIFT + C显示类视图窗口
F4 显示属性窗口
SHIFT + F4显示项目属性窗口
CTRL + SHIFT + E显示资源视图
F12 转到定义
CTRL + F12转到声明
CTRL + ALT + J对象浏览
CTRL + ALT + F1 ......

asp.net中a控件触发b控件服务器端事件

要实现a控件控件触发b控件服务器端事件,需给a控件添加js脚本,以b控件名义提交页面,具体代码:
var theForm = document.forms['form1'];
theForm.__EVENTTARGET.value = "b"; //触发b控件服务器端方法
theForm.__EVENTARGUMENT.value = "a trigger";//传递的参数
theForm.submit();
注意:需要设置页面属性中的 enab ......

google suggest 下拉菜单(asp.net/jQuery版本)

suggest.js文件(在引入suggest.js文件前需要先引入jquery-1.4.2.min.js):
 $(function() {
var k = -1;
//给查询文本框绑定click keyup事件,进行这两个事件,自动查询数据
$("#FrmChangshang").bind('click keyup', function(event) {
//获取键盘操作事件代码
var keyc = event ......

ASP.NET弹出对话框几种基本方法


 
 
 
 
ASP.NET弹出对话框几种基本方法
ASP.NET弹出对话框几种基本方法
我们在.NET程序的开发过程中,常常需要和用户进行信息交互,比如执行某项操作是否成功,“确定”还是“取消”,以及选择“确定”或“取消”后是否需要跳转到某个页面等,下面是 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号