Lecture16_CH4_Part_1.pdf - CH4%CONSTRUCTING...

Info icon This preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
CH4: CONSTRUCTING ASP.NET WEB PAGES (PART 1) BUILD YOUR OWN ASP.NET 3.5 WEB SITE USING C# & VB
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Outlines of today’s lecture Web forms HTML server controls Web server controls
Image of page 2
Web Forms The term used to describe an ASP.NET web page is web form , and this is the central object in ASP.NET development. You’ve already met web forms—they’re the .aspx files you’ve worked with so far. At first glance, web forms look much like HTML pages, but in addition to static HTML content they also contain ASP.NETV specific elements , and code that executes on the server side . Every web form includes a <form runat="server"> tag , which contains the ASP.NETVspecific elements that make up the page.
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
The Basic Structure of Web Forms
Image of page 4
Types of Controls in ASP.NET We can use a range of user interface elements inside the form—including typical, static HTML code. But we can also use elements whose values or properties can be generated or manipulated on the server either when the page first loads, or when the form is submitted. These elements—which, in ASP.NET parlance, are called controls. There are several types of controls in ASP.NET: HTML server controls web server controls web user controls master pages
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
HTML Server Controls HTML server controls are outwardly identical to plain old HTML tags, but include a runat="server" attribute . This gives the ASP.NET runtime control over the HTML server controls, allowing us to access them programmatically . For example, if we have an <a> tag in a page and we want to be able to change the address to which it links dynamically, using VB or C# code, we use the runat="server" attribute.
Image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern