TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
selvi subramanian
NA
799
574.5k
add and multiply value
Aug 20 2013 4:38 AM
my design is
<table class="style1">
<tr>
<td>
a</td>
<td>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
b</td>
<td>
<asp:TextBox ID="TextBox2" runat="server" ontextchanged="TextBox2_TextChanged" AutoPostBack="true"></asp:TextBox>
</td>
</tr>
<tr>
<td>
a+b</td>
<td>
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
mul</td>
<td>
<asp:TextBox ID="TextBox4" runat="server" ontextchanged="TextBox4_TextChanged"
AutoPostBack="True"></asp:TextBox>
</td>
</tr>
<tr>
<td>
multl</td>
<td>
<asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>ans</td>
<td>
<asp:TextBox ID="TextBox6" runat="server"></asp:TextBox>
</td>
</tr>
</table>
my coding is
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class math : System.Web.UI.Page
{
REMO sel = new REMO();
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
// float c= float.Parse(TextBox1.Text) + float.Parse(TextBox2.Text);
//TextBox3.Text = Convert.ToString(c);
//float s = c * float.Parse(TextBox4.Text);
//float s = ((c * float.Parse(TextBox4.Text)));
//TextBox5.Text = Convert.ToString(s);
}
protected void TextBox4_TextChanged(object sender, EventArgs e)
{
float amm=(float.Parse(textbox1.Text)+float.Parse(textbox2.Text));
TextBox3.Text = Convert.ToString(amm);
double guna = int.Parse(TextBox3.Text) * (14.5 / 100);
TextBox5.Text = Convert.ToString(guna);
}
protected void TextBox2_TextChanged(object sender, EventArgs e)
{
float c = float.Parse(TextBox1.Text) + float.Parse(TextBox2.Text);
TextBox3.Text = Convert.ToString(c);
}
}
i need to add textbox 3 value with textbox5 value and show it in text box 6
Reply
Answers (
2
)
Dumb File - Import - MySQL
button visibility should dissapear after postback