Reputation: 955
I'm currently working on an ASP.Net web application. Just curious when I noticed that I have both javascript codes and C# codes. Is it possible to transfer all my javascript codes to c# codes to make it looks more consistent? Thanks!
Upvotes: 0
Views: 136
Reputation: 63966
Javascript is a language that executes on the Browser, on the Client Side; C# code is executed on the web server.
Upvotes: 0
Reputation: 19765
C# is your server-side, back-end logic to support your web page. The JavaScript is client-side code running in the browser, often to improve the user experience and perform some logic or UI operations wihtout having to go to the server.
Upvotes: 0
Reputation: 245429
No. JavaScript code executes on the Client Side. C# executes on the Server Side. They perform two different functions and can't be treated interchangeably.
Upvotes: 3