This topic is locked
[SOLVED]

display a list of currently logged in users in AsprunnetNet

3/5/2024 12:11:09 PM
ASPRunner.NET General questions
P
plunkchr author

Hi folks.
Just wondering if anyone was able to create an AsprunnetNET version of below PHP example to display a list of currently logged in users in the page header (or footer) ?
https://xlinesoft.com/blog/2015/04/21/displaying-a-list-of-users-that-are-currently-logged-in/

Regards, cp.

admin 3/5/2024

You ar aware of PHP to C# converter, right?
https://xlinesoft.com/php2dotnet/

P
plunkchr author 3/6/2024

Thanks for getting back. Yes, I am aware of and have used the converter before.

Its not the coding that is the issue, its that the PHP example shows PHP code that can be pasted into a header HTML page to do DB lookup and display output, was wondering if anyone had created a way of doing this for a header/footer in AspRunnetNET .

admin 3/6/2024

Got it and makes sense.

The code that was in the header file needs to be split into two parts. The part that updates the current user data need to go to AfterAppInit event, so it is executed on each page. The code that displays the stats needs to go to a code snippet on those pages where you need to add this functionality.

We have also had a DevClub webinar recently dedicated to this topic.

img alt

P
plunkchr author 3/7/2024

Thanks. I will look at using the suggestions provided, which should do the job.
I have not signed up to dev club so unfortunatly do not have access to the logins demo files, thanks anyway.