16,012,028 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Ravinder Kumar Sharma (Top 3 by date)
Ravinder Kumar Sharma
1-Feb-13 2:35am
View
Thanx, I am sending the aspx code as well as under:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="calculator.aspx.cs" Inherits="Calculator_full.calculator" %>
<!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 runat="server">
<title></title>
<link href="Calculator.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.style2
{
margin-left: 4px;
}
.style3
{
margin-left: 0px;
}
.style4
{
background-color: Olive;
font-family: Arial;
font-size: 15px;
font-weight: bold;
color: Black;
}
.style5
{
background-color: red;
font-family: Arial;
font-size: 15px;
font-weight: bold;
color: Black;
}
.style6
{
background-color: Olive;
font-family: Arial;
font-size: 15px;
font-weight: bold;
color: Black;
margin-left: 0px;
}
.style7
{
background-color: gray;
border: solid 2px black;
font-family: Arial;
font-weight: bold;
color: black;
font-size: 16px;
vertical-align: middle;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<contenttemplate>
<table align="center" width="35%" style="border-left: 2px solid #00F; border-right: 2px solid #00F;
border-bottom: 2px solid #00F; border-top: 2px solid #00F;">
<tr>
<td colspan="6">
</td>
</tr>
<tr>
<td colspan="6" align="center">
<asp:TextBox ID="txt_result" runat="server" Style="text-align: right" Width="93%"
Height="30px" BorderColor="Black" BorderStyle="Groove" CssClass="style3" OnTextChanged="txt_result_TextChanged">
</td>
</tr>
<tr>
<td colspan="6">
</td>
</tr>
<tr>
<td colspan="2" width="33.33%" align="center">
<asp:Button ID="btn_clear" runat="server" CssClass="style6" Text="C" BorderColor="Black"
Font-Bold="True" Width="104px" OnClick="btn_clear_Click" />
</td>
<td colspan="2" width="33.33%" align="center">
<asp:Button ID="btn_clearall" runat="server" Text="CE" CssClass="style4" BorderColor="Black"
Font-Bold="True" Width="102px" OnClick="btn_clearall_Click" />
</td>
<td colspan="2" width="33.33%" align="center">
<asp:Button ID="btn_power" runat="server" Text="ON/OFF" CssClass="style5" BorderColor="Black"
Font-Bold="True" Width="108px" OnClick="btn_power_Click" />
</td>
</tr>
<tr>
<%--<td width = "33.33%" class="style1">
<asp:Button ID="btn_clear" runat="server" Text="C" BorderColor="Black" Font-Bold="True"
Width="55px" />
</td>
<td width="33.33%">
<asp:Button ID="btn_clearall" runat="server" Text="CE" BorderColor="Black" Font-Bold="True"
Width="60px" />
Ravinder Kumar Sharma
31-Jan-13 6:26am
View
Thanx but you dont understand dear, for this purpose i already have button for 1 actually i need to replace the value to any digit on click after pressing ON
Ravinder Kumar Sharma
31-Jan-13 6:24am
View
Please read the code carefully and then understand the help that I need.
I want that there is zero in the result textbox when I press ON.
After this I want that now the value that goes in the textbox must replace 0 that we get on pressing ON and on the same button the text is changed i.e. afer pressing ON the text on the same button changes to Off. So, i want clear textbox on pressing OFF, Please help me out.