473,395 Members | 2,006 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

RaisePostBackEvent question

how come RaisePostBackEvent doesn't work correctly if the
IPostBackDataHandler isnt implemented. It seems that I must at least have:

public bool LoadPostData(String postDataKey, NameValueCollection values) {
return false;
}

public void RaisePostDataChangedEvent() {
}
In order for the eventArgument string to come through properly in:

public void RaisePostBackEvent(String eventArgument) {
Anyone know why?

TIA
Karl
Nov 18 '05 #1
2 4921
If you have IPostBackDataHandler implemented and you wish
IPostBackEventHandler.RaisePostBackEvent called (means you have implemented
both interfaces), you'd need to use Page.RegisterRequiresRaiseEvent to get
RaisePostBackEvent called . Otherwise it is not called at postback
processing stage.

If this doesn't help, what kind of control it is in question? If it is a
composite one, you'd need to implement INamingContainer interface for
postback data to be routed correctly. Post some more code.
--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke
"Karl Hungus" <nn*********@hotmail.com> wrote in message
news:LX********************@twister.nyc.rr.com...
how come RaisePostBackEvent doesn't work correctly if the
IPostBackDataHandler isnt implemented. It seems that I must at least have:

public bool LoadPostData(String postDataKey, NameValueCollection values) {
return false;
}

public void RaisePostDataChangedEvent() {
}
In order for the eventArgument string to come through properly in:

public void RaisePostBackEvent(String eventArgument) {
Anyone know why?

TIA
Karl

Nov 18 '05 #2
Im asking why it doesnt work if you *dont* implement IPostBackDataHandler. I
dont need to do anything with either method of that interface.

If I do not implement that interface, my RaisePostBackEvent is called but
the eventArgument is empty. If I do implement it, just in a barebones way,
as described below, eventArgument behaves correctly.
"Teemu Keiski" <jo****@aspalliance.com> wrote in message
news:O9**************@tk2msftngp13.phx.gbl...
If you have IPostBackDataHandler implemented and you wish
IPostBackEventHandler.RaisePostBackEvent called (means you have implemented both interfaces), you'd need to use Page.RegisterRequiresRaiseEvent to get
RaisePostBackEvent called . Otherwise it is not called at postback
processing stage.

If this doesn't help, what kind of control it is in question? If it is a
composite one, you'd need to implement INamingContainer interface for
postback data to be routed correctly. Post some more code.
--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke
"Karl Hungus" <nn*********@hotmail.com> wrote in message
news:LX********************@twister.nyc.rr.com...
how come RaisePostBackEvent doesn't work correctly if the
IPostBackDataHandler isnt implemented. It seems that I must at least have:

public bool LoadPostData(String postDataKey, NameValueCollection values) { return false;
}

public void RaisePostDataChangedEvent() {
}
In order for the eventArgument string to come through properly in:

public void RaisePostBackEvent(String eventArgument) {
Anyone know why?

TIA
Karl

Nov 18 '05 #3

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

Similar topics

0
by: Lucas Tam | last post by:
Hi all, I've been struggling for the past few days to get a custom control to pass events to RaisePostBackEvent. My page successfully fires the RaisePostBackEvent, however, the EventArugment...
4
by: Karl Hungus | last post by:
how come RaisePostBackEvent doesn't work correctly if the IPostBackDataHandler isnt implemented. It seems that I must at least have: public bool LoadPostData(String postDataKey,...
5
by: jdn | last post by:
In my page load, I have the following DropDownList.Attributes.Add ("onblur", Page.GetPostBackEventReference(this, "Update")) The page itself implements IPostBackEventHandler (I don't want a...
4
by: Sam Martin | last post by:
hi, I'm making a custom control that is rendered implementing the IPostBackEventHandler interface, and have got it working fine for a single submit button, but how do i pass arguments from the...
2
by: Steve Guidos | last post by:
1) Start a new web application in Visual Studio 2) Drop a CheckBox onto the form and set its AutoPostBack to TRUE 3) In the codebehind, override the RaisePostBackEvent event with: protected...
0
by: jwb | last post by:
I've created a control within a Web Control library, using ASP.NET 1.1 (VB.NET). The control has a value property and a ValueChanged event. I have implemented the IPostBackEventHandler interface...
1
by: ginny | last post by:
I wrote code like this, found checkbox cause post back, but won't fire this function, but button do, could you help me figure out? Thanks. protected override void...
0
by: mankuipeng | last post by:
I am doing ActiveReports with .NET environment. There is a ASP.NET page, with custom control on it. Control displays data from database, by editing all the necessary data and click 'Submit' button to...
3
by: Trex | last post by:
ASP.NET RaisePostbackEvent Issues I ran into some problems on a particular page in an application. Only on that page, for the same control that worked in other pages, the RaisePostbackEvent was...
0
by: Dario | last post by:
Hi! I'm building an ASP.NET application using master pages, but there is a problem that I can't solve. In a master page there are some controls and some controlplaceholders, that I fill...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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...
0
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...
0
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,...

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.