ASP.NET

Kindle Programming Book Layouts

Thanks to Wrox author Barry Dorrans (Beginning ASP.NET Security) for inspiring this quick post. I've taken a few screen grabs here to show everyone who asks what our books look like on a Kindle. These were captured on a Kindle 3. The captures are from Bill Evjen, Scott Hanselman, and Devin Rader's Professional ASP.NET 4.0.

Tags:

How to Use ASP.NET 4 User Controls

How to Use ASP.NET 4 User Controls

Beginning ASP.NET 4 bookUser controls are great for encapsulating markup, controls, and code that you need repeatedly throughout your site. To some extent, they look a bit like server controls in that they can contain programming logic and presentation that you can reuse in your pages. However, rather than dragging existing ones from the VWD Toolbox, you need to create your own user controls and then add them to your ASPX pages, as you learn how to do later in this chapter.

Though master pages enable you to create content that is displayed in all pages in your site, it’s common to have content that should appear only on some but not all pages. For example, you may want to display a banner on a few popular pages, but not on the home page or other common pages. Without user controls, you would add the code for the banner (an image, a link, and so on) to each page that needs it. When you want to update the banner (if you want to use a new image or link), you need to make changes to all pages that use it. If you move the banner to a user control and use that control in your content pages instead, all you need to change is the user control, and the pages that use it pick up the change automatically. This gives you a flexible way to create reusable content.

Tags:

How to Create Master Pages with ASP.NET 4

How to Create Master Pages with ASP.NET 4

Beginning ASP.NET 4 bookMaster pages are added to the site using the Add New Item dialog box. They can be placed anywhere in the site, including the root folder, but from an organizational point of view, it’s often easier to store them in a separate folder. Just like normal ASPX pages, they support the inline code model as well as the Code Behind model. The master pages used in the Planet Wrox project use the Code Behind model exclusively. In the following exercise, you learn how to create a simple master page and add some HTML to it to define the general structure of the pages in your web site.

Tags:

Creating a Simple Web-Based Calculator with ASP.NET 4

Creating a Simple Web-Based Calculator with ASP.NET 4

Beginning ASP.NET 4 bookIn this exercise you create a simple calculator that is able to add, subtract, multiply, and divide values. It shows you how to use some of the logical and assignment operators and demonstrates the If and Select Case / switch constructs.

1. Start by creating a new Web Form called CalculatorDemo.aspx in the Demos folder. Make sure you don’t name the page Calculator or you’ll run into troubles later in this chapter where you create a class by that name. Once again, make sure you’re using the Code Behind model and select the correct programming language.

Tags:

Creating Your First ASP.NET 4 Web Site

Creating Your First ASP.NET 4 Web Site

Beginning ASP.NET 4 bookYou probably can’t wait to get started with your first ASP.NET web site, so instead of giving you a theoretical overview of web sites in VWD, the next Try It Out exercise dives right into the action and shows you how to build your first web project. Then, in the How It Works explanation and the section that follows, you get a good look at what goes on behind the scenes when you view an ASP.NET page in your browser.

Tags:

Visual Studio 2010 User Group Offer.

In celebration of the release of Visual Studio 2010, we are thrilled to offer user group members 40% off of the following Visual Studio books, including available DRM-free ebooks.

Tags:

Software Testing Terminology

Testing Terminology

As with many different aspects in programming, testing disciplines have their own unique vocabulary. However, because of the number of terms, the barrier to entry is high and can scare new developers. This section is intended to get the reader up to speed on some common terms that will be used throughout the remainder of this book. The terms shown next are only intended to be a brief explanation. Each term will be discussed thoroughly in their respective chapters.

 

Tags:

Testing ASP.NET WebForms

ASP.NET WebForms

ASP.NET WebForms was released as part of the .NET platform in 2002. The release was a major milestone for developers all over the world, allowing them to produce more powerful web applications using the new C# language and Visual Studio.NET. One of the key advantages to ASP.NET was being able to quickly develop applications by taking advantage of built-in controls that allowed you to quickly display, edit, and delete data from a database and, in later versions, complete membership systems with the hard work already done for you.

 

Tags:

Design and Test Driven Development

Design and Test Driven Development

TDD is not about testing; it’s more of a design technique. But how can writing tests before you write the code encourage a good design? Simply taking the time to stop and think before you write code can have a huge impact on the design of a system. This leads to an important question: what is a good design?

Well-designed software is the subject of many different books. However, we follow a core set of concepts focused on the SOLID principles outlined by Robert Martin (a.k.a. Uncle Bob). SOLID is a set of five principles based on the best practices for object-oriented development.

 

Tags:

Tools for ASP.NET UI Testing

Tools for ASP.NET UI Testing

It’s important to keep in mind that when you’re testing the UI, you are testing human activity. Because of this, you should let the computer perform the tasks it is good at, and you should perform the types of tasks you are good at. When developers and testers first learn about the tools that can be used to test the UI, they often think that everything can now be automated, and this is very far from reality. Chapter 7 [of the book Testing ASP.NET Web Applications by by Jeff McWherter and Ben Hall (ISBN: 978-0-470-49664-0, Wrox, 2009, Copyright Wiley Publishing Inc.)] talks about manual testing in depth, but for now it’s important that we understand that manual testing is still a very important testing discipline in the testing cycle.

 

Tags:
Syndicate content