cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
khaleehh
Engaged Sweeper II

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>

1 ACCEPTED SOLUTION
Daniel_B
Lansweeper Alumni
The following widget page will show the username which is logged on to the web console:

<%@ 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>

View solution in original post

3 REPLIES 3
Daniel_B
Lansweeper Alumni
Users log on to IIS Express or IIS. Not sure if there is any way to get a list from there.
LJayP
Engaged Sweeper III
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
Daniel_B
Lansweeper Alumni
The following widget page will show the username which is logged on to the web console:

<%@ 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>

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now