Lesson 2 Deploying a Web Application

Deploying a Web application means installing the application on the server where it will run. Because Web applications run on servers, Web applications usually don' t need an installation program. In this way, Web applications are very different from Windows applications, which are distributed to users on CD-ROMs or other media and which use an installation program to install and register components on the user' s machine. In this chapter, you will learn how to deploy a completed Web...

Creating the Custom Control Project

Custom controls are simply classes that are built into an assembly. These custom control classes inherit much of their behavior from the WebControl class and they implement various interfaces, depending on the type of control you are creating. The easiest way to get started is to use the Web Control Library project template provided by Visual Studio .NET. To create a custom control using the project template, follow these steps 1. From the File menu, choose New and then select Project from the...

Repairing Deployed Applications

After a Web application is deployed, you can revise and repair it in place, without restarting the server or IIS. To repair a deployed Web application, copy the new assembly (.dll) and or content files (.aspx, .ascx, and so on) to the application folder on the server. ASP.NET automatically restarts the application when you replace the assembly you do not need to install or register the assembly on the server. ASP.NET Web applications also have a limited ability to repair themselves through...

Exercise 3 Create the Add Contact Form

The Contact Management application allows users to add information about new contacts through the AddContact Web form. The AddContact Web form is a straightforward data entry form with text boxes for each of the data items in a Contact table record. When complete, the AddContact Web form will appear as shown in Figure 5-24. To create the AddContact data entry Web form To create the AddContact data entry Web form 1. Add a new Web form to the project named AddContact.aspx. 2. In the Properties...

Displaying Help as Web Forms or HTML

Creating your Help content as Web forms or HTML pages is probably the simplest approach to providing user assistance. The Help files can reside in either the same project folder as your Web application or in a subordinate folder. You use hyperlinks or other controls to display the Help in the browser, just as you would any other page, with one important difference you usually want to display Help in a new window or in a separate frame from the rest of the Web application, as shown in Figure...

Sounds as ActiveX Objects

You can include sounds as ActiveX objects on a Web form by inserting an HTML object element with the appropriate class ID clsid information for the specific player you want to use. Inserting sounds as objects allows you to control the playback from client-side scripts using the element as an object. To include a sound as an object, follow these steps 1. Add a media player ActiveX object to the Web form. 2. Set the properties of the ActiveX object to play the sound. 3. Add code to determine if...

Lesson 1 Authenticating and Authorizing Users

Authentication is the process of identifying users. Authorization is the process of granting access to those users based on identity. Together, authentication and authorization provide the means to keeping your Web application secure from intruders. In this lesson, you will learn how ASP.NET handles anonymous users, and you' ll get an overview of the different ways you can identify and authorize users. This information will help you choose an authentication strategy based on the type of...

Exercise 4 Use the Flash CardClass from Web Form Events

In this exercise, you will add code to the Web form to use the FlashCardClass object stored in the Session state variable. This links the logic FlashCardClass to the user interface FlashCard.aspx . To use the FlashCardClass object from event procedures in the Web form 1. Open the Web form' s code module FlashCard.aspx.vb in the Code window by double-clicking anywhere on the Web form. 2. Declare a module-level object variable to receive the object from the Session state. 3. In the Page_Load...

Exercise 4 Performing Culture Dependent Conversion

Just as the Currency Converter displays a different interface for different cultures, it also performs different conversions based on the current culture. In this exercise, you will write the code that performs the culture-dependent conversions. To perform the culture-dependent conversions Add the following code to the butOK_Click event procedure to detect the current culture and perform different conversions based on that information Private Sub butOK_Click ByVal sender As System.Object, _...

Setting Culture in Webconfig

Use the Web.config file' s globalization element to create a culture-specific Web application. The culture attribute of the globalization element determines how the Web application deals with various culture-dependent issues, such as dates, currency, and number formatting. Because a Web application can have only one Web.config file, setting the culture attribute makes that Web application culture-specific. All requests and responses to that Web application will be handled using the specific...

Lab Building a Simple Web Application

In this lab, you will create the FlashCards application. FlashCards is a simple, one-form Web application that displays math problems and evaluates the entered result just like the flash cards used in an elementary-school math class. To complete the FlashCards application, you will create a Web form, add server controls to the form, and control those server controls from the Page_Load event procedure. The Web form will look like Figure 2-19 when complete. Figure 2-19 The completed FlashCard Web...

Lesson 2 Using ASPNET

In this lesson, you will learn how ASP.NET organizes a Web application into parts, and you will learn the roles and names of those parts. You will be introduced to Web Forms, which are the central user-interface element of Web applications. ASP.NET is part of the larger .NET Framework, so this lesson will also discuss how the .NET Framework is organized and how .NET applications run differently from the traditional Windows applications you might be used to. Finally, this lesson ends with a...

M y s jt ife c Debug

Start Page Find Title.aspx Fn-idTitle.a amp px b Contents.htm System, aspx Web.config System.aspH.Yb Private Sub butCalculate Click EyVal sender A3 System. Object gt EyVal e A3 Syste 1 Declare variables. Dim dblRadius As Double 1 Convert text input to a double optional . dbiRadius dblCircAi 2 System. Hath. PI System.Hath.Pow dblRadius, 2 1 Display 'dblCircArea1 is not declared 1erver control. litResult.Text The circle's area is lt b gt dblCircArea lt b gt . End Sub Figure 1-23 Error detection...

Lesson 1 Types of Applications

Browser Server Architecture

Web applications are one of four types of Internet applications that you can create using Visual Studio .NET and Microsoft ASP.NET. In this lesson, you will learn a little about the different types of Internet applications and get an overview of how a Web application works. After this lesson, you will be able to Describe four different types of Internet applications and know where to look for training on developing each type of application Explain how a Web application executes over the...