473,500 Members | 1,661 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4923
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
1080
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
1027
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
2898
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
3456
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
4396
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
1382
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
1402
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
1253
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
6270
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
1247
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
7136
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
7018
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
7183
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,...
1
6909
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
5491
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,...
0
4614
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...
0
3110
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...
1
675
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
317
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...

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.