asp.net将当前用户登陆信息插入IE的状态栏:

首先,定义一个script函数

<script language="javascript">
  function getss(value)
  {
    window.status=value;
  }
  </script>

在FORM定义中添加onload="getss('%=Loginstatus%')"

最后,在代码编辑页面添加:

  private static string username;
  private static string date;
  public static  string Loginstatus;

  username=Session["username"].ToString();
   date=DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss");
   Loginstatus="欢迎使用倍杨办公管理系统  |  当前登陆用户:"+username+"  |  登陆时间:"+date;

http://blog.csdn.net/werther161/archive/2005/09/07/473812.aspx
posted on 2007-02-25 13:52  mbskys  阅读(175)  评论(0)    收藏  举报