Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CST272 Project No. 2 Introduction to ASP.NET and C# Plato said that the ideal age of a mans wife is half his own age plus

CST272 Project No. 2 Introduction to ASP.NET and C# Plato said that the ideal age of a mans wife is half his own age plus seven; if that were true the ideal age of a womans husband would be twice her age minus 14. Write an ASP.NET application that calculates the ideal age of a persons spouse. There will be an input TextBox and two Button server controls. If the user clicks the I am a male Button, the application will calculate the age of his wife; if the user clicks the I am a female Button the application will calculate the age of her husband. Start a new ASP.NET Web Site project and add the following elements on the Web page as follows: An appropriate title using a centered heading line (e.g.

,

, etc.) should begin the page (use an embedded style sheet in the section to center this title) Find (on the Internet or some other location) or create a banner style image appropriate to the application and place it also centered (also using the embedded style sheet) following the heading line; this image file should be placed in a folder named images within your Web Site project folder Place a formatted horizontal rule (you may choose what type of formatting but also place it in the embedded style sheet) following the image Create a table of four rows and one column placing the a TextBox server control (include a descriptive label for the TextBox, e.g. Enter your age), two Button server controls (one each for I am a male and I am a female), and the Label server control each in separate cells; center the table within the Web page (also using the embedded style sheet) Update the IDs (names) of the TextBox server control to TextBoxAge, the two Button server controls to ButtonMale and ButtonFemale, and the Label server control to LabelResults For either of the Buttons assign the input value from the TextBoxAge TextBox to a variable of type int using the appropriate Visual C# conversion method Then calculate the output age of the spouse and assign the result to the Label server control with a descriptive label in the format The ideal age of your wife is 19 or The ideal age of your husband is 24 You may receive a possible 9 out 10 points for the assignment as presented in the textbook and above; for full credit (a maximum of 10 possible points), test during the numeric conversion of the input from the TextBoxAge TextBox server control is numeric prior to subsequent processing as follows: If the input is not numeric, use try ... catch processing to catch the exception and display an appropriate error message to the user within the output Label server control (you may have to go on-line to find out how to implement this functionality but exception handling in C# is exactly the same as it is in Java) If the input age is numeric, continue with the specified processing

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Inductive Databases And Constraint Based Data Mining

Authors: Saso Dzeroski ,Bart Goethals ,Pance Panov

2010th Edition

1489982175, 978-1489982179

More Books

Students also viewed these Databases questions

Question

1. Prepare a flowchart of Dr. Mahalees service encounters.

Answered: 1 week ago