Add drop down lists for modifying the different style

Assignment Help DOT NET Programming
Reference no: EM13346576

Add drop down lists for modifying the different style elements for the label element that displays the time.

We will do it via postback to the server. As it is for demonstration, you need to have only a few items in the drop-down lists.

For instance, I chose 4 background colors: Black, Red, Blue, Green; 4 foreground colors: White, lightPink, lightBlue, lightGreen; font-size: I used xx-small, x-small, small, medium, large, x-large, xx-large, smaller, larger

Note: I did not use lightRed because, it appears to be not supported: opinionatedgeek.com/DotNet/Tools/Colors/

For including a drop-down menu in your ASP form, from the ToolBox, choose Standard -> DropDownList. Once you have the DropDownList on the form, check the box Enable AutoPostBack; you can also do this by right clicking the DropDownList, select Properties and check that AutoPostBack is set to True.

Of course, you can also change the ID for the box, and any other properties you may want to change. You can add Items to a DropDownList by clicking Edit Items, or by going to Properties and selecting Items; it will say Collection, you can click on Collection, and it will open a box that will allow you to add items. You can add items, remove items, and even set the default value (when the page loads) have the Selected flag set to true.

Once you have added the DropDownLists (I will say try to do one DropDownList and see that it works to satisfaction, and then add the other lists), we need to specify the code for the actions in the code behind file. Remember that Page_Load will already have the necessary code to display the current time. In the ASP form, if we double click on any of the drop down lists, the necessary function for the drop down list (index changed function) will be created in the code behind file. Suppose the drop down list for changing the fonts is called list1, then we add this line to the code behind file for the index changed function for this list timeLabel.Style.Add("font-size", list1.SelectedValue); See that font-size is the property that we are changing, and list1.SelectedValue will give the value selected by the user. Similarly, we can modify the background color for timeLabel based on the value in list2 by: timeLabel.Style.Add("background-color", backgroundColorList.SelectedValue);

We can modify the foreground color for timeLabel based on the value in list3 by: timeLabel.Style.Add("color", fontColorList.SelectedValue);

Build your solution, and execute it, and see that it runs fine. Now, transfer the solution to the virtual machine, and see that the code runs fine. What to turn in: Turn in the URL on the web server to see that your code is working. Also turn in the entire folder created by Visual Studio for you (as a zip file), which also includes your aspx and code behind files.

Reference no: EM13346576

Questions Cloud

Sockets for this problem you will implement a client-server : sockets for this problem you will implement a client-server version of the rock-paper-scissors-lizard-spock game which
Question 1assume a manufacturer incurs 2000000 hours of : question 1assume a manufacturer incurs 2000000 hours of direct productive labor in a year at a total direct labor cost
1nbsp find the natural domain of the following functions : 1.nbsp find the natural domain of the following functions. explain your results.2. given the equation y x2 - 6x 8 find
Product and engineering design review8 x product : product and engineering design review8 x product engineering and design review week 2 ndash 12 3 pages per item which
Add drop down lists for modifying the different style : add drop down lists for modifying the different style elements for the label element that displays the time.we will do
Report on american express - marketing strategycredit card : report on american express - marketing strategy.credit card industry was in boom before the recessionary phase but due
1 we want to find the integral of a function at an : 1. we want to find the integral of a function at an arbitrary location x from the origin.nbsp thuswhere ix0 is the
Write an essay onnbspwomen and gender : write an essay onnbspwomen and gender studies.introductionnbspthe first reading of gender and bodily difference
You will need a bottomuptwothreefourtree class with a : you will need a bottomuptwothreefourtree class with a bottomuptwothreetreefourtree constructor which takes no

Reviews

Write a Review

DOT NET Programming Questions & Answers

  Write a c# program containing array that holds five integers

Write a C# program containing an array that holds five integers. Assign values to the integers.Display the integers from first to last, and then display them from last to first. Save theprogram as IntegerList.cs.

  Write a function to convert the two dimensional coordinates

write a function to convert the two dimensional coordinates of a point from cartesian system to polar system by using x and y as its parameters

  Write a program that can be used to determine the tip amount

Write a program that can be used to determine the tip amount that should be added to a restaurant charge. Allow the user to input the total, before taxes and the tip percentage (15% or 20%). Produce output showing the calculated values including the ..

  Create a console-based application named multiplication

a. Create a console-based application named Multiplication whose main() method asks the user to input and then calls a method named MultiplicationTable(), which displays the results of multiplying the integers by each of the number 2 through 10

  Inventory management system in c# application

Inventory management system in c# application

  Write a program that allows auser to enter a car price

Write a program that allows auser to enter a car price. The output is the salesperson's commission. Save the programas Commission.cs.

  C# visual basic 2012 design stick figure for hangman game

Hangman is a favorite childhood game. using C# visual basic 2012 Design the stick figure for this game

  Create an application that displays total no of customers

Joe also performs other nonroutine services and charges for parts and labor ($20 per hour). Create an application that displays the total for a customer's visit to Joe's.

  What characteristics of the ajax programming style

What characteristics of the Ajax programming style do you believe will make it attractive to be utilized in applications within your workplace?

  Write c# program that declares variable to represent length

Please complete the following Programming Exercises listed in your book. All programs must be done according to these Programming Principles (properly formatted and commented). (If you want to see an example of a simple program, please see this Sa..

  Give their telephone numbers using one or more letters

People sometimes give their telephone numbers using one or more letters. write a program that accespts a 10 digit telephone number that may contain one or more letters. display the corresponding number using numerlas. the numbers and letters are a..

  Create a website to allow pizza shop employee to enter order

Create a website in asp.net to allow the pizza shop employee to enter customer orders. The size of the pizza cam be entered using a drop down list, and the quantity be entered using a text box.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd