What's the difference between code declaration blocks and render blocks?
Code render blocks are inline code, denoted by <% and %> tags, and aren't compiled. Code declaration blocks define a page's methods and members, are denoted by script tags, and are compiled.
What will be the output of the following ASP.NET page? Where would you save this file so users could access it?
1: <%@ Page Language="VB" %> 2: 3: <script runat="server"> 4: sub Page_Load(Sender as Object, e as EventArgs) 5: lblMessage.Text = "This is my first exercise!" 6: end sub 7: </script> 8: 9: <html><body> 10: <asp:Label runat="server"/> 11: </body></html>
This page would display "This is my first exercise!" You could save this file in the c:\inetpub\wwwroot\tyaspnet21days\day1 folder as exercise1.aspx and view it through the browser with http://localhost/tyaspnet21days/day1/exercise1.aspx.