Explore BrainMass
Share

Creating a basic VB Web Application

This content was STOLEN from BrainMass.com - View the original, and get the already-completed solution here!

Create a Visual Studio 2008 ASP. NET Web Site with two Web Forms. The name of your Web site should be based on your last name. For example, if your last name is Jones, then assign the name Jones_IP2.

The first Web Form contains one Label server control, two TextBox server controls, and two Button server controls with the Text "Compute Area" and "Compute Perimeter." The Label server control contains the Text, "Enter numbers in the text boxes and then click a button to perform the calculation." Use a Try-Catch code block to display an error message if the user inputs a value less than or equal to zero in either of the TextBox server controls. Use validator server controls to validate each TextBox server control to verify the user entered something into each TextBox server control and that the entered value can be converted to a number.

The second Web Form contains a Label server control. Use cross-page posting to display a message in the Label server control on the second Web Form when the user clicks one of the calculation Button server controls on the first Web Form. For example, if the user enters "4" and "5" in the TextBox server controls on the first Web Form and then clicks the "Compute Area" button server control, the second Web Form will display the message "The area of a 4 by 5 rectangle is 20" displayed in the Text property of the Label server control. If the user enters the same values and clicks the "Compute Perimeter" Button server control, the second Web Form will display the message "The perimeter of a 4 by 5 rectangle is 18" displayed in the Text property of the Label server control. The message must include the values input by the user, the selected calculation to perform and the calculated value. Use a decision structure to assign different colors to the font of the Label server control based on the calculated value. If the calculated value is greater than 100, the output in the Label server control should display in a red font. If the calculated value is greater than or equal to 50 and less than or equal to 100, the output in the Label server control should display in a green font. If the calculated value is less than 50, the output in the Label server control should display in a blue font. The Label server control should also display an error message to the user if they tried to input a value that was less than or equal to zero in either of the TextBox server controls on the first Web Form.

© BrainMass Inc. brainmass.com October 25, 2018, 3:02 am ad1c9bdddf
https://brainmass.com/computer-science/visual-basic/creating-basic-vb-web-application-324575

Solution Summary

This solution contains a basic VB Web Application with two web forms.

$2.19
See Also This Related BrainMass Solution

Visual Basic is specialized for development of Windows applications. VB is an event driven programming language that was originally released in 1991 with degrees of similarity to Microsoft's QuickBASIC. VB rose to popularity among developers in the mid-1990s due to its visual user interface development tools. Visual Basic is a component ofVisual Studio.NET (Exforsys, 2000).

Visual Basic is specialized for development of Windows applications. VB is an event driven programming language that was originally released in 1991 with degrees of similarity to Microsoft's QuickBASIC. VB rose to popularity among developers in the mid-1990s due to its visual user interface development tools. Visual Basic is a component ofVisual Studio.NET (Exforsys, 2000).

Programmers using Visual Basic can write an application using components supplied withinVisual Basic. VB is a programming language that is used heavily in business programming, competing directly with C++ and JavaScript (Exforsys. 2000). VB was created to allow programmers to easily create GUI (Graphical User Interface) applications while being an easy to learn programming language. VB is also capable of developing more complex applications by combining visually arranged components and controls on a form, using specific attributes and actions of the components and adding functionality through additional lines of code. A programmer will find VB simple in its code, since the programming language provides default attributes and actions defined for its components (Exforsys, 2000).

Visual Basic comparison with other programming languages

Fortran has become popular and widespread because of its unique combination of properties. Its numerical and input/output facilities are almost unrivalled while those for logic and character handling are as good as most other languages (Page, 2001). Fortran is simple enough that you do not need to be a computer specialist to become familiar with it fairly quickly, yet it has features, such as the independent compilation of program units, which allow it to be used on very large applications. Programs written in Fortran are also more portable than those in other major languages. The efficiency of compiled code also tends to be quite high because the language is straight-forward to compile and techniques for handling Fortran have reached a considerable degree of refinement (Page, 2001). Finally, the ease with which existing procedures can be incorporated into new software makes it especially easy to develop new programs out of old ones.

Java language offers many benefits in object orientation programming. Java is used to create small programs, known as "applets," to be embedded in web pages. For instance, a web page using Java could contain an interactive weather map, a live display of subway trains, or a video game, without the need for the web server to do all of the work (Boutell.com, 2008). Java will allow users to write the program once and run it anywhere on the java platform. Another key benefit of Java is its security features. Both the language and the platform were designed from the ground up with security in mind (O'Reilly, 2001). The Java platform allows users to download untrustworthy code over a network and run it in a secure environment in which it cannot do any harm: it cannot infect the host system with a virus, cannot read or write files from the hard drive, and so forth. This capability alone makes the Java platform unique (O'Reilly, 2001).

Perl is a dynamic programming language very similar to C in many respects. It is used most widely in system administration, web site development (especially on the GUI side), and networking tasks. It is known to be a very straight-forward, easy to use programming language (Schneider, 2010.). As a result of Perl being used extensively in web development, it is a very popular language. Many companies, both large and small, use Perl to write CGI (Common Gateway Interface) scripts. These are the scripts that allow web applications to interact with the server (Schneider, 2010.).

Visual Basic (VB)is a simplified way to create a Graphical User Interface that is often found in HTML coding. Instead of using a plethora of complex lines of coding to provide object images and location placement, users can add prebuilt objects into place on the screen. VB is a user friendly model that is an ideal programming tool for beginners and professional web programmers.

View Full Posting Details