// EventHandling.aspx
1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EnventHandling.aspx.cs"
2. Inherits="asp.netexample.EnventHandling" %>
3.
4.
5.
6.
7.
15.
16.
17.
48.
49.
Code Behind
// EventHandling.aspx.cs
1. using System;
2. using System.Collections.Generic;
3. using System.Linq;
4. using System.Web;
5. using System.Web.UI;
6. using System.Web.UI.WebControls;
7. namespace asp.netexample
8. {
9. public partial class EnventHandling : System.Web.UI.Page
10. {
11. protected void Button1_Click(object sender, EventArgs e)
12. {
13. int a = Convert.ToInt32(firstvalue.Text);
14. int b = Convert.ToInt32(secondvalue.Text);
15. total.Text = (a + b).ToString();
16. }
17. }
18. }