TEMPESTINI.NET

Observations in Software Development

Posts Tagged ‘ASP.NET’

Lab 11 – ADO.NET Part II

Posted by Rick Tempestini on July 21, 2007

You will add new features to the web application built in Lab 10. You will add a second page that will allow you to insert authors into the database using a parameterized SQL INSERT statement.

Lab11
Default.aspx
Default.aspx.vb
Entry.aspx
Entry.aspx.vb
web.config

Posted in Labs | Tagged: , , | Leave a Comment »

Lab 10 – ADO.NET Part I

Posted by Rick Tempestini on July 21, 2007

You will create a small web application that will retrieve information from your local SQL Server database. You will populate a DropDownList control with the names of all the authors in the pubs database. Then you will enhance the application to retrieve specific information for the author selected in the DropDownList control.

Lab10
Default.aspx
Default.aspx.vb
web.config

Posted in Labs | Tagged: , , | Leave a Comment »

Lab 9 – Navigation

Posted by Rick Tempestini on July 19, 2007

In this lab, you will enhance the web site built in Lab 8. You will add 3 more pages to the web site and then add navigation using a web site map and a TreeView control.

Lab9
Default.aspx
Default2.aspx
Default3.aspx
Default4.aspx
Label.skin
MasterPage.master
web.config
web.sitemap

Posted in Labs | Tagged: , , , | Leave a Comment »

Lab 8 – Creating Master Pages, Themes, and Skins

Posted by Rick Tempestini on July 19, 2007

Create a master page that will be used as a template for every page within the web site. This master page will use a HTML table to layout the four main sections of the page: header, navigation, content area, and footer. You will then create a simple theme and skin file to alter the font for the label control that was placed on the page.

Lab8
apress.jpg
Default.aspx
MasterPage.master
Label.skin

Posted in Labs | Tagged: , , , , | 1 Comment »

ASP.NET Display Property of the Validation Controls

Posted by Rick Tempestini on July 12, 2007

The display property for the ASP.NET validation controls have 3 settings: None, Static, and Dynamic. The results of setting the display property to None is self-explanatory. However, what is the difference between Static and Dynamic? The difference between the two can be seen when looking at the source in your browser after the page is loaded at run-time.

When the Display property is set to Dynamic, the CSS display attribute is set to none on the control. When the Display property is set to Static, the CSS visibility attribute is set to hidden and the display property is not used at all as shown in the browser output below:

Validation Control Display = Dynamic

<td style=”width: 491px; height: 16px”>
<span id=”RangeValidator1″
style=”display: inline-block; color: Red; width: 226px;
display: none;“>The age must be between 0 and 100 </span>
</td>


Validation Control Display = Static

<td style=”width: 491px; height: 16px”>
<span id=”Span1″
style=”display: inline-block; color: Red; width: 226px; visibility: hidden;“>
The age must be between 0 and 100 </span>
</td>

The default setting on the control for the Display property is Static. By setting this to Static the space for the error message is reserved. The advantages here is that the controls placed positionally to the right of the validation control will not be moved at run-time if the display message of the validation box appears.

Posted in Other | Tagged: , , | 2 Comments »

Lab 7 – State Management

Posted by Rick Tempestini on July 11, 2007

You will create a two page web site. You will use query string, cookie, and session state to pass information from the first page to the second page.

Lab7
Default.aspx
Default.aspx.vb
Default2.aspx
Default2.aspx.vb

Posted in Labs | Tagged: , , | Leave a Comment »

Lab 6 – Validation Controls

Posted by Rick Tempestini on July 11, 2007

In this lab you will build a simple form that demonstrates the usage of the ASP.NET validation controls. You will create a simple form that accepts a Name, Age, Email, and Phone Number for a person.

The requirements for the text boxes on this entry page are listed below:

Requirement Validation Control Needed
The Name field is required and cannot be blank RequiredFieldValidator
The Age field must not allow numbers less than zero or greater than 100 RangeValidator
The Email field must capture valid internet email addresses RegularExpressionValidator
The Phone Number field must capture valid phone numbers RegularExpressionValidator

You will then configure the validators to properly meet the requirements above. At the end, you will implement the Validation Summary control to change the display of the validation errors.

Lab6
Default.aspx

Posted in Labs | Tagged: , , | Leave a Comment »

Lab 5 – Exception Handling

Posted by Rick Tempestini on July 4, 2007

In this lab you will experiment with various ways to handle runtime exceptions. You will create a simple web page that will divide two numbers. If a zero is used in the calculation, you will trap the error and display it on the web page. Also, you will enable an option for run-time page tracing.

Lab5
Default.aspx
Default.aspx.vb

Posted in Labs | Tagged: , , | Leave a Comment »

Lab 4 – Create a Simple Web Application

Posted by Rick Tempestini on July 4, 2007

This lab will create a web application that creates a greeting card similar to the one in chapter 6 of your book. You will add and populate dropdown list controls and radio button list controls. Then, you will experiment with the AutoPostBack property of the controls.

Lab4
Default.aspx
Default.aspx.vb
defaultpic.png

Posted in Labs | Tagged: , | 3 Comments »

Lab 3 – Create a Currency Converter

Posted by Rick Tempestini on June 19, 2007

In this exercise you will create an application similar to the currency converter created in Chapter 5 from your book. This application will convert U.S. dollars to various currencies using HTML server controls. The application will use application settings in the web.config file to make updates easier than recompiling and redeploying the entire application.

Lab3
Default.aspx
Default.aspx.vb
web.config

Posted in Labs | Tagged: , | 5 Comments »

 
Follow

Get every new post delivered to your Inbox.