473,664 Members | 3,066 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

event chain in asp.net

Im interested in knowning how the web control event gets passed to
server and how its processed there.

Like how the click event of a web control button gets called for example

any sort of e-resource that would explain that?

*** Sent via Developersdex http://www.developersdex.com ***
Jul 20 '08 #1
2 2059
its really pretty simple.

a control that fires a server click has javascript code that does a
postback (the browser posts all form data) to the server. the exception
is the imagebutton and button which do not require any javascript unless
they are performing validation. the javascript places the name of the
control (and the cmdarg value) in a hidden field before the postback.

the serverside code processes the postback, after page load, it checks
for a control name in the hidden field, it then looks for a control with
that name. if the control implements, IPostBackEventH andler, it calls
RaisePostBackEv ent, which is where the control decides what type of
event to raise. Normally the server control will define an event
delegate and call it.

there is a simular approach for postback data handling. the control
implements an inteface (IPostBackDataH andler), is is called with the
postback data, update its self and returns a flag if any data change
events need calling. the page processor will call the handler and the
control will raise the event.

a browser page postback consists of a named value collection of all
browser form fields (<input>, <selectand <textarea>) contained in the
<formdoing the submit. the format is pretty simple:

<fieldname1>=<f ieldvalue1>&<fi eldname2>=<fiel dvalue2>&

the names and values are urlencoded to handle imbedded special characters.

a browser submit button or image button will add itself to the list if
clicked (the image button actually sends a x and a y value via
buttonname_x and buttonname_y). this is how the server tells if one of
them caused the postback.
-- bruce (sqlwork.com)

Paul F wrote:
Im interested in knowning how the web control event gets passed to
server and how its processed there.

Like how the click event of a web control button gets called for example

any sort of e-resource that would explain that?

*** Sent via Developersdex http://www.developersdex.com ***
Jul 20 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
4130
by: rodrigo | last post by:
I have a Asp.net table control that I dynamically add rows from a SQL database. Inside the table, I add radiobuttons and they all have different ID numbers according to BindChain() Looking In BindChain() Sub for the line: AddHandler Rb.CheckedChanged, AddressOf BindAssembly_Click
10
3581
by: tony kulik | last post by:
This code works fine in ie and opera but not at all in Mozilla. Anybody got a clue as to how to get it right? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <script language="JavaScript" type="text/javascript"> function show(that) { if (box.style.visibility=='hidden') { that.style.visibility = 'visible'}; }
1
20691
by: Covad | last post by:
Hi all, For some reason my change() function is only called when the page loads. I'd much rather it gets called when the select changes. Here's the code: window.onload = init; function init() {
9
6834
by: mike | last post by:
I have this script executing <script> function mike_test(event) { x = window.event.clientX; alert(x); } </script> <iframe src="blank.html" id="my_iframe1"> </iframe>
15
21351
by: prabhdeep | last post by:
Hi, Can somebody explain, why in following code, i get "event not defined" error funcTest(sMenu) { doument.getElementById('id1').addEventListener('mousedown', function(){ click(sMenu, event); }, false); }
17
10193
by: dan_williams | last post by:
I have the following test web page:- <html> <head><title>Test</title> <script language="Javascript"> <!-- function fnTR() { alert("TR"); }
14
2111
by: Snor | last post by:
I'm attempting to create a lobby & game server for a multiplayer game, and have hit a problem early on with the server design. I am stuck between using a threaded server, and using an event driven server. I've been told time and time again that I should use an event driven server design (that is, use twisted). There is a lot of interaction between the clients and they would often need to write to the same list of values, which of course...
2
2646
by: Ralph | last post by:
Hi I don't understand why it's not working: function schedule(imTop){ this.tdImagesTop = imTop; } schedule.prototype.selectEl = function() { alert(this.tdImagesTop);
5
6155
by: steve.chambers | last post by:
I'm sure this q must have been asked before but I'm really struggling to find the answer anywhere so have finally given up and will consult the usenet community - hopefully there's someone out there who's seen it all before and can help me out! I have a webpage which needs to make some function calls after the page has loaded - won't go into details surfice to say here is a code fragment: function addLoadEvent(func) { var oldonload =...
6
2622
by: TriFuFoos | last post by:
Hi there, I was wondering if anyone knew if/how to assign an event to a global variable? I tried to do it and IE 7 came back with an error saying "Member not found" My code looked similar to the following: var globalEvevnt; function showPopup(event){ globalEvent = event;
0
8437
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8348
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8861
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8549
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7375
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6187
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5660
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
2003
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1759
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.