如何在侧栏显示在线用户? [英] how to display online user in side bar?

查看:49
本文介绍了如何在侧栏显示在线用户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



im使用vs 2010和asp.net在社交网站上制作网络应用程序,其中我想在用户和管理页面上显示当前在线用户。

解决方案

试试这个链接而不是在global.asax文件中设置应用程序状态,当有人登录时设置它


我得到了你的第一个点。要在线显示用户数,您需要使用应用程序状态。计算用户的号码,在会话中设置并在主/网页中访问它。检查链接:

演示应用程序状态 [ ^ ]

ASP.NET应用程序状态概述 [ ^ ]

ASP.NET中的应用程序状态 [ ^ ]



要显示管理页面,您可以在母版页中设置链接。并要求用户输入admin UserID和Password。如果用户提供的凭据正确,则重定向到管理页面。否则,您可以使用 Asp.net会员 [ ^ ]这样做。请参阅链接:

如何:在ASP.NET中使用角色管理器 [ ^ ]

了解ASP.NET角色和成员资格 - 初学者''教程 [ ^ ]







--- Amit

hi
i m making web application on social networking site using vs 2010 and asp.net, in which i want to display currently online user on user''s as well as admin page.

解决方案

hi, try this link instead of setting the Application state in the global.asax file , set it when someone logges in


I got your first point. To display the no of users online you need to use Application state. Count the no of user''s, set it in a session and access it in your master/web page. Check the links out:
A Walkthrough to Application State[^]
ASP.NET Application State Overview[^]
Application State in ASP.NET[^]

To display admin page you can set a link in master page. And ask user to enter admin UserID and Password. If the credentials provided by user is correct then redirect to Admin Page. Otherwise, you can use Asp.net Membership[^] to do that. See the links:
How To: Use Role Manager in ASP.NET[^]
Understanding ASP.NET Roles and Membership - A Beginner''s Tutorial[^]



---Amit


这篇关于如何在侧栏显示在线用户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆