Link to home
Start Free TrialLog in
Avatar of GoldyLock
GoldyLock

asked on

Import different namespace based on user credentials

Hi,

Depending on what permissions a user has that logs into a system the page should dynamically import the correct namespace for those permissions. (a sort of if-statement for namespaces). Is this possible? If so, please show with code example.

thanks, Gil  
Avatar of paltareq
paltareq

i think sthere is no way to import namespace programaticaly ....

but what the problem if u import all namespace  and in the code give all users
different access acording to his  permissions ?
Avatar of Nazermohideeen
There could be a possibility by using compiler directives #if ... #else ... #endif. You will have to access the windows temprary variables, and see who is the current user. But this is a strange requirement, Can excatly explain why you have such a requirement, may be I could suggest an alternative solution.

But if you stick with your requirement, You will have to do some research on how to implement this using the directive. But I believe that this is the only way, by which  you could avoid few lines of code from compiling, based on condition.

NM
ASKER CERTIFIED SOLUTION
Avatar of dstanley9
dstanley9

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial