as you can see here the addition of two numbers is showing on the top of the page but I want to show the addition of two numbers in the table tag so how can I do that? how can i show result of two number in the table tag what should i do?
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body >
<form id="form1" runat="server">
<div>
<table id="tbl1" align="center">
<tr>
<th>
Enter the Number1:
<asp:TextBox ID="textbox1" runat="server"></asp:TextBox>
</th>
</tr>
<tr>
<th>
Enter the Number2:
<asp:TextBox ID="textbox2" runat="server"></asp:TextBox>
</th>
</tr>
<tr>
<th>
<asp:Button ID="Button2" runat="server" Text="Add" OnClick="Button1_Click" />
</th>
</tr>
</table>
</div>
</form>
</body>
</html>
using System;
using System.Collections.Generic;
using System. Linq;
using System. Web;
using System.Web.UI;
using System. Web. UI.WebControls;
namespace sample1
{
public partial class First: System.Web. UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
int no1 = Convert.ToInt32(textbox1.Text);
int no2 = Convert.ToInt32(textbox2.Text);
int c = no1 + no2;
Response.Write(c);
}
}
}
