Dotnet / Javascript confusion - C#