This topic is locked

Selective list page

5/8/2018 11:33:10 PM
ASPRunner.NET General questions
S
stefansuba author

HI

I need to list different data on the List Page based on the user name.

I was thinking using Events for the List page - Before display
Line one is created by Blake

Line two is created by Ana

Data :

Column1 Column2 Column3 created by

Mason 234 ford Blake

Greg 123 Honda Ana
User logged in : Mason should see only
Column1 Column2 Column3 created by

Mason 234 ford Blake
User logged in : Greg should see only
Column1 Column2 Column3 created by

Greg 123 Honda Ana
Thx guys!

admin 5/9/2018

How's about Advanced Security option 'Users can see and edit their own data only'?

https://xlinesoft.com/asprunnernet/docs/advanced_security_settings.htm

T
Tim 5/9/2018

Or you could use a "SQL variable" in the "where" of your SQL query
https://xlinesoft.com/asprunnernet/docs/sqlvariables.htm
i.e.
select column1,

column2,

column3

from mytable

where createdby = ':session.FooBar'
In this example you'd have to setup the "FooBar" session variable at logon, or wherever makes sense. Or check out the ':user.field' variable.
Tim