C Board  

Go Back   C Board > General Programming Boards > C# Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 11-19-2009, 06:16 PM   #1
Registered User
 
Join Date: Apr 2008
Posts: 58
How does .ASPX generate HTML?

I know it may require a hefty explanation, but I was wondering if anyone knew how a .aspx file generates html when you load it into a browser?

I mean...the first internet explorer came out way before .aspx pages, so how does .aspx work with browsers that came out before its existence?

What I would really like to know is...if I created a .asdf format, how would I get it to actually load as an html page in browsers, rather than have it display the contents of the file in the browser?
arcaine01 is offline   Reply With Quote
Old 11-19-2009, 06:39 PM   #2
Guest
 
Sebastiani's Avatar
 
Join Date: Aug 2001
Posts: 5,034
>> I know it may require a hefty explanation, but I was wondering if anyone knew how a .aspx file generates html when you load it into a browser?

The ASP interpreter simply runs the code, which can print HTML as output.

>> I mean...the first internet explorer came out way before .aspx pages, so how does .aspx work with browsers that came out before its existence?

It runs on the server, not the client (eg: your browser).

>> What I would really like to know is...if I created a .asdf format, how would I get it to actually load as an html page in browsers, rather than have it display the contents of the file in the browser?

Run an ASP server on your computer, I guess.
Sebastiani is offline   Reply With Quote
Old 11-21-2009, 06:31 PM   #3
Registered User
 
Join Date: Jul 2004
Location: Phoenix, Arizona
Posts: 26
When your browser requests a .aspx page, the server generates the html and sends it to your browser. Browsers don't look at the file extension to decide how to treat each page. When the server sends the HTML, it also sends a content type (text/html for html files). If you look at the source for a page once it's loaded, you'll see that it's just HTML without server specific code, because it's handled by the server before the html is sent to you.

I hope that wasn't confusing.
SwiftOutlaw is offline   Reply With Quote
Old 11-22-2009, 11:57 AM   #4
Super Moderator
 
Join Date: Sep 2001
Posts: 4,746
This is true of ASP, JSP, PHP, CGI, etc.... It's merely a program that runs on the server when a request is received. The program outputs HTML and that output is forwarded by the server back to the client. THe only difference is that out of all of these, ASP hides the HTML part of it from you the most. It adds a huge amount of javascript (for AJAX) and HTML to make all the events, etc... work with the server. continuously.
sean is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
html web translator/interpreter Aisthesis C++ Programming 6 08-02-2009 02:17 PM
Template metaprogramming, whats the point? Cogman C++ Programming 26 02-01-2009 11:47 PM
Please Help - C code creates dynamic HTML Christie2008 C Programming 19 04-02-2008 07:36 PM
Design + HTML orbitz C Programming 8 11-21-2002 06:32 AM


All times are GMT -6. The time now is 12:05 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22