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...
Exercise 2 Create a Translator Class
In this exercise, you will create a Friend class to contain the logic and data that the Translator application uses. 1. From the Project menu, choose Add Class. Visual Studio displays the Add New Item dialog box. Name the class TranslatorClass.vb and click Open. 2. In the code window, add the following code Private mstrText As String Private mstrOriginal As String ' Controls access to the module-level ' variables. Public Property Text As String Get Set ByVal Value As String mstrText Value '...
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...
Using IIS Settings with Windows Authentication
The authorization settings in Web.config overlap settings available in IIS. If authorization is set both in Web.config and IIS, the IIS setting is evaluated first and then the setting in Web.config is evaluated. In general, this means that the most restrictive setting will be used. To view authorization settings in IIS, follow these steps 1. In the IIS snap-in, right-click the Web application' s folder and select Properties. IIS displays the folder' s Properties dialog box. 2. Click the...
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 FlashCardClass 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...
VBScript Liq
lt script language vbscript gt if iCount gt 0 then exit sub ' Get X and Y mouse coordinates. xMouse window.event.clientx yMouse window.event.clienty ' Get X and Y image coordinates. xImg yImg ' Convert the coords from a string to a number. xImg cint left xImg,len xImg -2 yImg cint left yImg,len yImg -2 ' Close the distance between the two sets of coords, x xMouse - xImg 4 y yMouse - yImg 4 ' Launch every .1 seconds. if iCount lt 5 then iCount iCount 1 else iCount 0 ' Move the IMG elment to...
Exercise 4 Performing CultureDependent 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...
Visual C Adq
public class Sphere Circle float fCenter Initialize internal variable. fCenter 0 public override float Area 2 return float 4 Math.PI Math.Pow double base.Radius, 2 public new void Center float X, float Y this.Center X, Y, 0 public void Center float X, float Y, float Z return float 4 3 System.Math.PI Math.Pow double base.Radius, 3 To see how inheritance works, create a new object of each type and call each object' s properties and methods. The following code demonstrates the Circle and Sphere...
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 Lry
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
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...








