Link to home
Start Free TrialLog in
Avatar of ksd123
ksd123

asked on

Question on MVC

Hi Experts,

We have MVC4 Application and am going through the code and found following statement in index.cshtml file to get login ID.

var loginID='@((User as Sample.Project.Principal.Administrator).Name);

Open in new window

1)can anyone briefly explain User as in  the above statement

2)How can I write above statement without using "User as "

Thanks in Advance
ASKER CERTIFIED SOLUTION
Avatar of Carl Tawn
Carl Tawn
Flag of United Kingdom of Great Britain and Northern Ireland image

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
SOLUTION
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
Avatar of ksd123
ksd123

ASKER

Thank you guys.