Accessing server side variables in views and JavaScript
This is how I see server variables and local variables interacting.  There is not really any other way to get the values between the two that I'm aware of.

As for the code, I one minor point:change Emp to Employee for variable names.  This will eliminate confusion in the future from you, or anybody else reading the code (what does Emp mean?)

Other than that, this is really easy code to read.  Keep it up.