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> 67<br />

So, for example, to write new content to the output buffer, you’d simply call its Write<br />

method, like this:<br />

Response.Write("New Content");<br />

Or, to redirect the user to a new page, you can use this:<br />

Response.Redirect(http://someserver/somepage.htm);<br />

You can find more details here: http://msdn2.microsoft.com/en-us/library/system.<br />

web.httpresponse(VS.80).aspx.<br />

Summary<br />

In this chapter, you looked into <strong>ASP</strong>.<strong>NET</strong> <strong>and</strong> the page life cycle. You learned how<br />

<strong>ASP</strong>.<strong>NET</strong> processes pages <strong>and</strong> how page forms <strong>and</strong> server-side controls can be mixed to<br />

improve your developer productivity <strong>and</strong> your users’ experience when accessing your<br />

application. You saw the differences between using <strong>ASP</strong>.<strong>NET</strong> HTML controls <strong>and</strong> <strong>ASP</strong>.<strong>NET</strong><br />

server controls. You learned how maintaining page state can cause problems in scalability<br />

for applications, <strong>and</strong> how the <strong>ASP</strong>.<strong>NET</strong> view state functionality can give you a<br />

best-of-both-worlds approach—state maintenance in your application without<br />

consuming server resources.<br />

You looked into how events can get stored <strong>and</strong> fired, <strong>and</strong> how they can be fired<br />

immediately using automatic postbacks. Finally, you reviewed the Page <strong>and</strong> Controls collections,<br />

looking into how you can use code to manage <strong>and</strong> manipulate controls on a<br />

page, or even dynamically add controls or dynamically change the status of your page at<br />

runtime. Our example was changing the page header in code.<br />

In the next chapter, you’ll look at more application-specific code using data binding<br />

so that you can build real-world applications that provide user access to secured data<br />

stores.

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

Saved successfully!

Ooh no, something went wrong!