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

  Using .net resources to teach .net

This project will use the .NET framework to produce a set of materials to demonstrate the fundamental principles of .NET. Ideally it should demonstrate some of the principles of the framework e.g. interoperability.

  Use techniques to read bouble value from text box

Use the techniques to read the Bouble value from a TextBox. [Note: ou may need to use methods Convert.ToDouble and Convert.ToDecimal when doing calculations with the number of hours and charges, respectively.

  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..

  Convert meters to feet and inches.

1. Write a program that can be used to convert meters to feet and inches. Allow the user to enter a metric meter value in a method .

  Prepare a web application for internet service provider

Prepare a Web application and write the code also event planning document base. This web application allows the user to sign up for an Internet service provider for home connectivity.

  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.

  Create a windows form application

Create a Windows Form application that Reads a list of products from an xml file and shows a form that a customer can order

  Create a shopping cart in asp

The users will use a browser to access the on-line store. The web server software for the production web server is Windows 2003 Server /IIS6.

  Best way to code radio buttons that when

What is the best way to code radio buttons that when you check a checkbox, the radio buttons become active and add a cost to the Labor Price. I already have the buttons enabled when you select muffler, I can't figure out how to code the radio butt..

  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..

  Crm system

Development of a simple sales and invoice component where a customer fills out a form on a web page to request a truck delivery and then receives an online invoice in PDF format.

  Write a program that computes the amount of money

Write a program that computes the amount of money the computer club will receive from proceeds of their granola bar sales project. Allow the user to enter the number of cases sold and the sale price per bar. Each case contains 12 bars; each case is p..

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