Florida .NET User Groups
Florida .NET User Groups  Status: Not logged in

Hot News
Skip Navigation Links

Our Stuff
Skip Navigation Links

Community
Skip Navigation Links

Resources
Skip Navigation Links


JOBS HERE!
Active Jobs: 9

ASP .NET: HELP: Event Handler in ASP.NET
  
21. First value  
22.
  
25.   
26.   
27. Second value  
28.
  
31.   
32.   
33. Sum  
34.
  
37.   
38.   
39.    
40.
  
44.   
45.
From: Nikita Polyakov 9/19/2003 2:19:35 PM
Does anyone remember the event handler in ASP.NET?

Here is a scenario.
There is a wicked repeater.
It has textboxes and buttons trailed by a the id (ex. txtName102012312)
It also has buttons with the same thing (ex. cmdUpdate102012312)

I need an event handler that will post to the code behind function to handle these event where i will take it from there.

Any ideas? I remember some one at FL.NET did a demo of this, but it was client side, anyone see server side versions?


From: Mayuri Lahane 1/17/2019 6:20:18 AM
// EventHandling.aspx
1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EnventHandling.aspx.cs"   
2. Inherits="asp.netexample.EnventHandling" %>  
3.   
4.   
5.   
6.   
7.   
8. .auto-style1 {  
9. width: 100%;  
10.         }  
11. .auto-style2 {  
12. width: 108px;  
13.         }  
14.   
15.   
16.   
17.   
18.
  
19.   
20.
  
23.   
24.
  
29.   
30.
  
35.   
36.
  
41.
  
42.   
43.
  
46.   
47.   
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. }  



ASP .NET: HELP: Event Handler in ASP.NET

 

   
     
Copyright © 2001 - 2020 Florida .NET User Groups 
contact us
FlaDotNet is hosted by: http://www.appliedi.net