简体   繁体   中英

How to browser display asp.net controls on its page when it is said it strictly understands only html content and scripts?

I m learning asp.net basics. i was going through tutorial at www.dotnetspider.com and there it is explained browser understands only html content and scripts strictly. So when i create a webform and drop asp controls and run how does my browser understad that control content and displays on its page?

Your browser doesn't understand the ASP.NET controls. ASP.NET understands them. Whenever a web form is request ASP.NET takes the form and converts it into the HTML form and any scripts that are needed and sends them down to the browser.

Using the ASP.NET web controls makes your job easier, you don't have to worry about hooking together a bunch of HTML forms and code. But as the website says, it's all HTML to the user's browser.

Update:
When I say "ASP.NET understand them" I'm really talking about the ASP.NET frameworks and IIS (Microsoft's web server). So the request the User's browser sends out arrives at IIS. It knows from the URL that this is a request for an ASP.NET application. So it uses the ASP.NET code to take the .aspx pages and the .ascx controls and convert them into the HTML response. It then sends that HTML to the User's browser. So ASP.NET (and IIS) sit "in the middle" between the web broswer on the User's computer and the ASP.NET code and pages you write.

i just did found detail so i thought to write it might make it more clear in depth. its goes as Browser sends request to IIS -> goes to ISAPI dll(written in C++) -> Loads CLR Process where each control have render method finally emitts its html code -> Which browser can understand and display. Please correct me if im wrong some where.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM