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

Lansweeper Install Adobe Reader Error
by  Hilbers   Go to last post Go to first unread
Last post: Today at 3:08:30 PM(UTC)
Lansweeper End of Life Asset Report
by  Hendrik.VE  
Go to last post Go to first unread
Last post: Today at 2:18:23 PM(UTC)
Lansweeper Translation settings not saved
by  Brandon   Go to last post Go to first unread
Last post: Yesterday at 2:10:22 PM(UTC)
Lansweeper Combobox translation
by  sneagele  
Go to last post Go to first unread
Last post: Yesterday at 2:03:45 PM(UTC)
Lansweeper Freelance for Lansweeper Deploy?
by  Brandon   Go to last post Go to first unread
Last post: 5/7/2021 6:32:21 PM(UTC)
Lansweeper Installation issues
by  Richie_Rich  
Go to last post Go to first unread
Last post: 5/6/2021 11:29:09 PM(UTC)
Lansweeper Cloud relay data stored time
by  Richie_Rich   Go to last post Go to first unread
Last post: 5/6/2021 11:14:42 PM(UTC)
Lansweeper Custom attributes from AD
by  dhoward  
Go to last post Go to first unread
Last post: 5/6/2021 11:10:45 PM(UTC)