473,320 Members | 2,111 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,320 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 4915
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:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.