浏览器如何理解C#或VB.NET代码的语言 [英] How browser understands a language of C# or VB.NET code

查看:102
本文介绍了浏览器如何理解C#或VB.NET代码的语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我接受了一次采访,询问浏览器如何理解用c#或vb.net语言编写的代码。



我尝试了什么:



因为我知道浏览器向服务器发送请求,服务器处理它并发送响应。但我怎么回答这个问题?

i had a interview where they asked how browser understands a code written in c# or vb.net language.

What I have tried:

as for as i have known the browser sends a request to server and the server processes it and sends a response. but how do i answer this question???????????????

推荐答案

浏览器不懂c#或vb.net,该代码在服务器上运行并生成发送到浏览器的html,它是浏览器理解的html(以及javascript)。
Browsers don't understand c# or vb.net, that code runs on the server and generates html which is sent to the browser and it's the html the browser understands (as well as javascript).


这很容易。它们没有。



用C#或VB.NET或任何其他托管语言编写的代码不能在浏览器中运行。 />


在ASP.NET应用程序中,所有代码都在服务器上运行,而不是在浏览器上运行。



In在浏览器中运行的Silverlight应用程序,浏览器只是一个主机。代码由Silverlight .NET CLR在浏览器的容器中运行。





问题是一个设置,看看你是否知道你在说什么。
That's easy. They don't.

Code that is written in C# or VB.NET, or any of the other managed languages, doesn't run in the browser.

In an ASP.NET application, all that code runs on the server, not the browser.

In a Silverlight application that runs in a browser, the browser is just a host. The code is run by the Silverlight .NET CLR in a container in the browser.


The question was a setup to see if you knew what you were talking about.


这篇关于浏览器如何理解C#或VB.NET代码的语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆