08.01.2015 Views

Beginning Web Development, Silverlight, and ASP.NET AJAX

Beginning Web Development, Silverlight, and ASP.NET AJAX

Beginning Web Development, Silverlight, and ASP.NET AJAX

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 3 ■ WEB FORMS WITH <strong>ASP</strong>.<strong>NET</strong> 63<br />

Now you can access your HTML header in code. Here’s a simple example of some<br />

code running in the Page_Load event that sets the title of the page:<br />

theHead.Title = "Dynamically Created Title!";<br />

You could, for example, interface this with a membership API to create a dynamic<br />

title that welcomes the user by name. Figure 3-7 shows the page with the new, dynamically<br />

created title.<br />

Figure 3-7. Using the dynamically created title<br />

Also, if you look closely at the list containing the controls, you can see that the header<br />

ID has been set to theHead in Figure 3-7.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!