concept markup in category asp.net

appears as: markup, markup, The markup, The markup
ASP.NET 4.0 in Practice

This is an excerpt from Manning's book ASP.NET 4.0 in Practice.

Listing 1.2. A complete Web Form with markup and code

Web Form really means “web page”; the term itself is a marketing name. The reason behind this name is that ASP.NET can have only one Web Form at a time on a single page. ASP.NET pages contain server controls, namely objects. A server control is a server-side programmable piece of a page. You typically add server controls in the markup part of the page, but you can add them via code too. A server control is a specific tag in the markup.

A Web Form is usually composed of two files, one with markup and one with code. The code file is commonly referred to as code behind or code beside, depending on your project type.

Listing 4.1. Using the new Wizard control features to enhance markup
<asp:Wizard ID="MyWizard" runat="server" RenderOuterTable="false" DisplaySideBar="false"> <LayoutTemplate> <asp:PlaceHolder ID="headerPlaceholder" runat="server" /> <asp:PlaceHolder ID="sideBarPlaceholder" runat="server" /> <asp:PlaceHolder ID="wizardStepPlaceholder" runat="server" /> <asp:PlaceHolder ID="navigationPlaceholder" runat="server" /> </LayoutTemplate> <StartNavigationTemplate> <p><asp:LinkButton ID="StartNextButton" runat="server" CommandName="MoveNext" Text="Next" /></p> </StartNavigationTemplate> <WizardSteps> <asp:WizardStep ID="WizardStep1" runat="server" Title="Step 1"> Step 1 </asp:WizardStep> <asp:WizardStep ID="WizardStep2" runat="server" Title="End"> End! </asp:WizardStep> </WizardSteps> </asp:Wizard>

Although ASP.NET MVC is the ideal choice when you want to precisely control the markup generated by your pages, you can use an ASP.NET Web Form to achieve similar results. Plus, the truth is that you probably have investments in Web Form-based applications. You can’t rewrite them because that will cost you money—and time.