|
|
To hide controls on Add/Edit pages, based on logged user name,
use the following code in Add Page:
BeforeDisplay and/or Edit Page:
BeforeDisplay event.
Note: Change
the values listed in red to
match your specific needs.
1. To show the
Horsepower field edit
control only if user name equals "admin", use the following
code:
|
if Session("UserID")="admin" then
xt.assign "Horsepower_fieldblock",True
else
xt.assign "Horsepowerk_fieldbloc",False
end if
|
2. To show the
Horsepower field edit
control only if current user belongs to the admin group, use the
following code:
|
if Session("AccessLevel")=ACCESS_LEVEL_ADMINGROUP then
xt.assign "Horsepower_fieldblock",True
else
xt.assign "Horsepower_fieldblock",False
end if
|
More info about
ASPRunnerPro session variables.
|