Notification

Icon
Error

I need query for the currant loged user

Posted: Wednesday, December 31, 2014 7:02:42 AM(UTC)
khaleehh

khaleehh

Member Alpha Tester Original PosterPosts: 11
0
Like
This issue has been solved! Click here to view the solution

Hey , I need to made a page with some informatioms , and this my code ,
I need the statement to shows the logged user name to be showen :




<%@ Page Language="C#" ContentType="text/html" ResponseEncoding="utf-8" %>
<%@ Import Namespace="System.Activities.Expressions" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="LS" %>
<% LS.User.Current().CheckWebsiteAccess(); %>
<%
var DsAsset = DB.ExecuteObject("web50oneasset", DB.NewDBParameter("@assetid", Request["AssetID"]));
var dsos = DB.ExecuteObject("web50hwos", DB.NewDBParameter("@AssetID", Request["AssetID"]));
var dssystem = DB.ExecuteObject("web50hwsystem", DB.NewDBParameter("@AssetID", Request["AssetID"]));
var dssystemproduct = DB.ExecuteObject("web50hwsystemproduct", DB.NewDBParameter("@AssetID", Request["AssetID"]));
var dsschassis = DB.ExecuteObject("web50hwchassis", DB.NewDBParameter("@AssetID", Request["AssetID"]));
var dsprocessor = DB.ExecuteObject("web50hwprocessor", DB.NewDBParameter("@AssetID", Request["AssetID"]));
var dssound = DB.ExecuteObject("web50hwsound", DB.NewDBParameter("@AssetID", Request["AssetID"]));
var dsvideo = DB.ExecuteObject("web50hwvideo", DB.NewDBParameter("@AssetID", Request["AssetID"]));
var dsdrives = DB.ExecuteObject("web50hwdrives", DB.NewDBParameter("@AssetID", Request["AssetID"]));
var dsbios = DB.ExecuteObject("web50hwbios", DB.NewDBParameter("@AssetID", Request["AssetID"]));
var dsmemory = DB.ExecuteObject("web50hwmemory", DB.NewDBParameter("@AssetID", Request["AssetID"]));
var dsmemoryarray = DB.ExecuteObject("web50hwmemoryarray", DB.NewDBParameter("@AssetID", Request["AssetID"]));
var dsnetwork = DB.ExecuteObject("web50hwnetwork", DB.NewDBParameter("@AssetID", Request["AssetID"]));
var dssoftware = DB.ExecuteObject("web50hwsoftware", DB.NewDBParameter("@AssetID", Request["AssetID"]));
int tel = 1;
%>



<body style="background:#FFFFFF">
<% }%>
<tr>
<td class="lijntje"><span class="bigt" >< The Currant Loged User is: </span> </td>
</tr>
</body>

Daniel.B
#1Daniel.B Member Posts: 1,150  
posted: 1/5/2015 3:53:41 PM(UTC)
The following widget page will show the username which is logged on to the web console:

Code:
<%@ Page Language="C#" AutoEventWireup="true" Inherits="LS.BaseControl" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="LS" %>
<% Response.CacheControl = "no-cache";%>
<% Response.AddHeader("Pragma", "no-cache"); %>
<% Response.Expires = -1; %>
<%  LS.User.Current().CheckWebsiteAccess(); %>
 

<p>The current logged on user is: <%= LS.User.Current().UserName %> </p>

 
<script type="text/javascript">
    $('#WTitle<%=TabControlID %>', window.top.document).text("Username");
</script>
LJayP
#2LJayP Member Premium Users Posts: 15  
posted: 6/16/2015 1:25:00 PM(UTC)
Is there a way to make it show all logged on users on the web console?

Also can I make the username link to the profile so when you click on the user it will take you to there user asset page on lansweeper?

Thanks Dancing
Daniel.B
#3Daniel.B Member Posts: 1,150  
posted: 6/29/2015 10:53:34 AM(UTC)
Users log on to IIS Express or IIS. Not sure if there is any way to get a list from there.

Active Discussions

Installer Install .Net Framework 4.7.2
by  John B Fairbrother   Go to last post Go to first unread
Last post: 5/6/2021 4:58:23 PM(UTC)
Installer Sophos Silent Install
by  Craig  
Go to last post Go to first unread
Last post: 4/14/2021 8:09:58 PM(UTC)
Installer Say what you write
by  RobertoP   Go to last post Go to first unread
Last post: 3/31/2021 1:30:54 PM(UTC)
Installer Uninstall KB5000802
by  CyberCitizen  
Go to last post Go to first unread
Last post: 3/25/2021 7:51:14 AM(UTC)
Installer RDP - enable/disable - add/delete users
by  RobertoP   Go to last post Go to first unread
Last post: 2/9/2021 11:25:52 AM(UTC)
Installer Microsoft Edge (Chromium) 84.0.522.44
by  PLSJohnJohn  
Go to last post Go to first unread
Last post: 1/21/2021 11:46:38 PM(UTC)
Installer Install Tight VNC server
by  RobertoP   Go to last post Go to first unread
Last post: 12/16/2020 2:48:36 PM(UTC)
Installer Instal/Update Firefox to 84.0
by  RobertoP  
Go to last post Go to first unread
Last post: 12/16/2020 2:36:41 PM(UTC)