
In this section, you add some controls and a table so that you have elements to work with later in the walkthrough. You can add some elements, such as HTML tables, using a dialog box. In Design view, you can drag controls from the toolbox onto the page. The symbols are not all shown at the same time, but when you click a visual element, the nonvisual element that precedes it is shown. The designer displays symbols for paragraphs, line breaks, and other tags that do not render text.

On the View menu, point to Visual Aids, and make sure that ASP.NET Non-visual Controls is selected. To see HTML design surface tags in Design view When you are working in Design view, you might want to see tags such as div and span that do not have a visual rendering. Click Apply to see the values applied to the selected text. Select (value) from the letter-spacing dropdown list. Under Category, click Block, and then select (value) from the line-height drop-down list. The font family is applied to the selected text. Select a font from the font-family drop-down list and then click Apply. Select the Apply new style to document selection option. Highlight the text, then, on the Format menu, click New Style. Press ENTER after ASP.NET Web Page, and then type This page is powered by ASP.NET. Highlight the text to select it, and then on the Formatting toolbar click Heading 1.

If you are not in Design view, click Design, which is located at the lower left of the window.Īt the top of the page, type ASP.NET Web Page. To add and format static HTML in Design view Overall, Design view helps you visualize your page, but it is not an exact representation of how the page will render in a browser. Additionally, some elements, such as HTML tables, have a special Design view rendering that adds additional space for the editor. The second difference is that to help you edit your pages, Design view displays some elements and controls that will not appear in the browser. The first difference is that in Design view, the text and elements are editable. You can format text directly with formatting commands or by creating in-line styles.ĭesign view displays your page in a way that is similar to how it will appear in a browser, with some differences.


You can add text by typing, as you would in a word-processing program. In this part of the walkthrough, you will learn how to work in Design view, which provides a WYSIWYG-like view of the Web Forms page. Select Web Form, name the file Default.aspx, and then click Add. In Solution Explorer, right-click the root of your Web site, and then click Add New Item. Visual Studio creates a website project that includes a Web.config file. In the Web location box, select File System, and then enter the name of the folder where you want to keep the pages for your website.įor example, type the folder name C:\WebSites. Under Installed, click Visual Basic or Visual C# and then select ASP.NET Empty Web Site.įor this walkthrough, you create a website that does not include prebuilt pages and other resources. The New Web Site dialog box is displayed. Open Visual Studio or Visual Studio Express for Web. For information about the difference between these web project types, see Web Application Projects versus Web Site Projects. You could use a web application project instead. This walkthrough uses a web site project.
