© 2014 Firstsoft Technologies (P) Limited. login
Hi 'Guest'
Home SiteMap Contact Us Disclaimer
enggedu
Quick Links
Easy Studies

  HomeSource Code DotNet ► Asp.Net ▼

Visual Feedback (Background color)

It's sometimes desirable to give you user a proper feedback after an action he takes (after a button click for example). On of the most notable feedbacks is the change of the entire page background. For example, you can change your entire page background to red when your user clicks a critical button that performs a critical function.

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Untitled Page</title>
      <p align =center> Page Text </p>
      <p align =center> Page Text </p>
      <p align =center> Page Text </p>
      <! --================================================-- >
      <SCRIPT LANGUAGE =JAVASCRIPT> <!--
      function ChangeBackgroundColor(color)
          {
             document.bgColor=color
          }
      //--> </SCRIPT >
     <input type ="button" value ="Change to Cyan"
     onclick ="ChangeBackgroundColor('Cyan')" ID ="b1" NAME ="b1">
     <input type ="button" value ="Change to Fuchsia"
     onclick ="ChangeBackgroundColor('Fuchsia')" ID ="b2" NAME ="b2">
     <input type ="button" value ="Change to LightSlateBlue"
     onclick ="ChangeBackgroundColor('LightSlateBlue')" ID ="b5" NAME ="b5">
     <! --================================================-- >
 
</head>
<body>
    <form id="form1" runat="server">
    <div>
   
    </div>
    </form>
</body>
</html>

 

 

SLogix Student Projects

⇓Student Projects⇓
⇑Student Projects⇑
bottom