0

I wanted to build a web application that kids could view 4-H Record Book forms, criteria, and examples from a CD. I wanted it to be in a web page format so that it was platform-independent (compatible with Windows, Mac, and Linux). I wanted to write the application in ASP.NET, so that I could reuse pieces of my site (e.g. Master Pages, databound controls). It worked fine while in Debug mode running on my simulator server, but when I attempted to open the files without the server simulator, they simply displayed as blank pages.

I've learned thus far that ASP.NET requires a server to run, but my question is: why does it require a server when so much of ASP.NET is just HTML tags? Also, is there any way I can use ASP.NET features such as Master Pages and Databound controls on a local website?

Milliron X
  • 1,174
  • 14
  • 26
  • No, not without running an ASP.NET server. You can't do server processing if you don't have a server. This is like asking why you can't show an HTML page properly in notepad. – DLeh Aug 28 '14 at 17:16
  • 1
    I think you have a misunderstanding of how a web server works. The web server takes the page and reads the "special bits" (like master pages and controls) and usually uses data from a database. It does the heavy lifting and spits out plain HTML that any browser can read. – Khan Aug 28 '14 at 17:16
  • You will need a server to process the asp.net specific tags. Otherwise try adding a .html extension. – mxmissile Aug 28 '14 at 17:16

1 Answers1

1

Output of ASP.NET is html, css and other stuff, but ASP.NET itself is a very complex system that consists of many components, for instance code-behind classes, asp.net controls, event system, routing system, various libraries etc. The server has to somehow (I won't go into details, because it's a way too broad topic to explain like this) assemble the output and it will spit out the generated html, css etc. to the client who requested the file (typically a browser).

Browser itself can only work with final html, css, javascript and so on, but it can't do processing that needs to take place on the server-side.

walther
  • 13,466
  • 5
  • 41
  • 67