Results 1 to 6 of 6

Thread: Server control Event Handler

  1. #1
    Join Date
    Nov 2009
    Posts
    652

    Server control Event Handler

    Hello, I am learning asp.net and while working on it, I want to know the details about the Server Control Event Handler. I have one reference book, but it is not having more details about it. So, if you are having more details about it, then it will be helpful to me. So, reply about it.

  2. #2
    Join Date
    Feb 2008
    Posts
    1,852

    Re: Server control Event Handler

    SP.NET Server Control Event Model consist of the following important points:
    • Event Set for Server Controls and Pages
    • Postback and Non-Postback Events in Server Controls
    • Forwarded Events
    • Binding Events to Methods
    • Bubbled Events
    • Application and Session Events

  3. #3
    Join Date
    Jan 2008
    Posts
    1,521

    Re: Server control Event Handler

    Hello, I am working on the Server Control Event Handler and getting the problem in following code:
    Code:
    this.OnSelectedIndexChanged = "test_SelectedIndexChanged";
     protected void test_SelectedIndexChanged(object sender, EventArgs ea)
            {
                .........
            }
    Can anyone help me to find out the error.

  4. #4
    Join Date
    May 2008
    Posts
    2,389

    Re: Server control Event Handler

    Events raised by ASP.NET server controls work somewhat differently than events in traditional client forms or in client-based Web applications. The difference arises primarily because of the separation of the event itself from where the event is handled. In client-based applications, events are raised and handled on the client. In Web Forms pages, on the other hand, events associated with server controls are raised on the client but handled on the Web server by the ASP.NET page framework. For events raised on the client, the Web Forms control event model requires that the event information be captured on the client and an event message transmitted to the server, via an HTTP post. The page framework must interpret the post to determine what event occurred and then call the appropriate method in your code on the server to handle the event.

  5. #5
    Join Date
    Apr 2008
    Posts
    1,948

    Re: Server control Event Handler

    Hello, It is quiet simple to make use of the Server control Event Handler. You can achieve it as follows:
    Code:
         protected void Text_Changed(object sender,EventArgs ae)
          {
          TextBox textbox1 =null;
          textbox1 = (TextBox)sender;
          ......
          ......
          }

  6. #6
    Join Date
    May 2008
    Posts
    2,012

    Re: Server control Event Handler

    You can simply bind the dynamic control as below in c#

    Code:
    Button b1 = new Button;
    b1.Text = "Click";
    b1.Click += new System.EventHandler(ButtonClick);
    Placeholder1.Controls.Add(b1);

Similar Threads

  1. An event handler to start the Approval Workflow in MOSS 2007
    By DotNetUser in forum Windows Software
    Replies: 3
    Last Post: 13-03-2011, 07:06 AM
  2. The event handler in WSS 3.0
    By Computer_Freak in forum Tips & Tweaks
    Replies: 2
    Last Post: 21-02-2011, 07:05 AM
  3. Event handler in Share Point Server
    By Cruzz in forum Software Development
    Replies: 3
    Last Post: 20-11-2009, 05:48 AM
  4. How to add an AutoPlay Handler for an Event ?
    By Dyumani in forum Operating Systems
    Replies: 3
    Last Post: 17-03-2009, 11:29 AM
  5. Service Control Manager Event ID 7001 and W32Time Event ID 29
    By Cic!cone in forum Small Business Server
    Replies: 3
    Last Post: 03-11-2007, 09:32 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,241,400.25023 seconds with 17 queries