473,734 Members | 2,211 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What causes a server event to fire due to a change on the client?

What causes a server event to fire when something happens on the client?
Say a user changed the gridview's page index, the server side
PageIndexChange d event is fires.

What makes PageIndexChange d fires? Is it a field in the viewstate? Is it a
value in the forms collections? I am trying to understand the mechanism of
communication between the browser and the server.

John Dalberg
Apr 25 '07 #1
1 1489
the communication betweoen the client and server are html form fields
(input,select, and textarea). when a postback happens the form fields
are sent to the server as name/value pairs.

when you write a server control your control responds to two events (not
real events they are interface methods rather than delegates) generated
by the frame work.

1) LoadPostData - your control called and passed all the form postback
values, and your data key (rendered control name).

you can store you original value in viewstate, and compare the postback
value to it. if different you can raise some sort of OnChange event

2) RaisePostBackEv ent - you control will render some client script to
raise this event by calling __dopostback with the control name and one
option string arg. the name and arg are stored in hidden fields and form
postback is done.

server side the framework will see this control name in the postback
data, and call this RaisePostBackEv ent. your control then raises
whatever event(s) (say onclick) it wants.

see its all very simple.
-- bruce (sqlwork.com)
John Dalberg wrote:
What causes a server event to fire when something happens on the client?
Say a user changed the gridview's page index, the server side
PageIndexChange d event is fires.

What makes PageIndexChange d fires? Is it a field in the viewstate? Is it a
value in the forms collections? I am trying to understand the mechanism of
communication between the browser and the server.

John Dalberg
Apr 25 '07 #2

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

Similar topics

0
7041
by: Andy Read | last post by:
Hello all, I have the requirement to produce source code that produces an object hierarchy. Example: Root | Folder 1
121
10127
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode support IDEs are DreamWeaver 8 and Zend PHP Studio. DreamWeaver provides full support for Unicode. However, DreamWeaver is a web editor rather than a PHP IDE. It only supports basic IntelliSense (or code completion) and doesn't have anything...
3
1594
by: Reetu | last post by:
Hi All, I have an html button on .aspx page. <INPUT class="sbttn" id="btnComplete0" onclick="onComplete ()" type="button" value="Mark Completed" name="btnComplete0"> When the user clicks on the html button the OnComplete function is called.
2
1682
by: Curtis Kam | last post by:
Dear all, I'm now using TCP socket using user-defined protocol to communicate between two machines (server and client). But now, I'd like to introduce a Web Service in my server-side. If my client software subscribes the web service, does it have the flexibilty to fire a event to server? That is, is there any similar function just like DCOM (they can fire event to each other and remote function call)? Thanks in advance.
2
2661
by: Stuart Whiteford | last post by:
Hi, I asked this back in January without answer and forgot about it until now. I've got a basic web form, two textboxes, a couple of radio button groups, some required field validators, and a Submit and Cancel button. When the page loads, if I click the Cancel button, the server-side event fires as normal.
1
1561
by: tomcarr1 | last post by:
What event is triggered in ASP.Net when you close the browser ? What event is normally used to trigger clean up stuff when going from one form to another or leaving the project?
7
1734
by: amit | last post by:
Hello everybody, I need your advice on this. In my javascript I'm using two anchor <A> which both are to download a pdf file. That works fine but my question is why the "this" parameter in calling function detects different HTML elements?! for the first one (below) it sees it as <IMGbut the second one is seen as <AWhy?
19
4756
by: Daniela Roman | last post by:
Hello, I try to fire an event under a button click event and maybe anybody can give a clue please. I have let's say a WEB grid with PageIndexChanged event: private void DataGrid1_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
11
14826
by: antonyliu2002 | last post by:
I know that this has been asked and answered thousands of times. As a matter of fact, I know that I need to say If Not Page.IsPostBack Then 'Do something End If for things that needs to be processed by the web server. I am still struggling to understand this postback logic, and hope that some kind gurus out there could help me clarify the confusion I have.
0
8774
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
9447
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...
0
9307
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9181
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8186
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
6735
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
4550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3261
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2180
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.