Q&A

Q1:Why is it important that an ASP .NET Web page, when requested by a Web browser, return only HTML?
A1: As we saw in Listing 4.1, when creating an ASP.NET Web page, we can include source code, HTML markup, and Web controls. However, when an ASP.NET Web page is requested by a Web browser, the content returned to the Web browser is just HTML markup (refer back to Listing 4.2). You might wonder why this is so, since there are potential advantages for having an ASP.NET Web page return more than just plain HTML.

For example, imagine that an ASP.NET Web page could send the Web browser the Web control syntax, as opposed to the rendered HTML markup. That is, if an ASP.NET Web page contained a TextBox Web control, it would be sent to the user as ...

Get SAMS Teach Yourself ASP.NET in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.