473,626 Members | 3,467 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

RaisePostBackEv ent question

how come RaisePostBackEv ent doesn't work correctly if the
IPostBackDataHa ndler isnt implemented. It seems that I must at least have:

public bool LoadPostData(St ring postDataKey, NameValueCollec tion values) {
return false;
}

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

public void RaisePostBackEv ent(String eventArgument) {
Anyone know why?

TIA
Karl
Nov 18 '05 #1
2 4941
If you have IPostBackDataHa ndler implemented and you wish
IPostBackEventH andler.RaisePos tBackEvent called (means you have implemented
both interfaces), you'd need to use Page.RegisterRe quiresRaiseEven t to get
RaisePostBackEv ent 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 INamingContaine r 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*********@ho tmail.com> wrote in message
news:LX******** ************@tw ister.nyc.rr.co m...
how come RaisePostBackEv ent doesn't work correctly if the
IPostBackDataHa ndler isnt implemented. It seems that I must at least have:

public bool LoadPostData(St ring postDataKey, NameValueCollec tion values) {
return false;
}

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

public void RaisePostBackEv ent(String eventArgument) {
Anyone know why?

TIA
Karl

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

If I do not implement that interface, my RaisePostBackEv ent 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****@aspalli ance.com> wrote in message
news:O9******** ******@tk2msftn gp13.phx.gbl...
If you have IPostBackDataHa ndler implemented and you wish
IPostBackEventH andler.RaisePos tBackEvent called (means you have implemented both interfaces), you'd need to use Page.RegisterRe quiresRaiseEven t to get
RaisePostBackEv ent 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 INamingContaine r 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*********@ho tmail.com> wrote in message
news:LX******** ************@tw ister.nyc.rr.co m...
how come RaisePostBackEv ent doesn't work correctly if the
IPostBackDataHa ndler isnt implemented. It seems that I must at least have:

public bool LoadPostData(St ring postDataKey, NameValueCollec tion values) { return false;
}

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

public void RaisePostBackEv ent(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
1091
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 is always nothing. I do not understand why the event argument is not being passed (the doPostBack javascript seems to have both parameters filled out).
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, NameValueCollection values) { return false; } public void RaisePostDataChangedEvent() { }
5
2907
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 custom control) as #region IPostBackEventHandler Member public void RaisePostBackEvent(string eventArgument if (eventArgument == "Update"
4
3468
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 HTML page back to the server, e.g. identify which button has been pressed. At the moment i can only cause a postback by using a submit button, are there any other ways? - i.e. can a do a manual javascript, document.forms.submit() ?
2
4403
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 override void RaisePostBackEvent( IPostBackEventHandler sourceControl, string eventArgument) { base.RaisePostBackEvent(sourceControl, eventArgument); } 4) Set a breakpoint in the event handler
0
1407
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 and have ensured that my control renders using the UniqueID. I have not added any code associated with an AutoPostBack, because it did not seem necessary for the application. My control works great when I drop a single instance onto the web form....
1
1420
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 RaisePostBackEvent(IPostBackEventHandler sourceControl, string eventArgument) { //Response.Write("source control is " + sourceControl + "eventArgument is " + eventArgument); base.RaisePostBackEvent (sourceControl, eventArgument);
0
1268
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 render ActiveReport. When I click 'Submit' button. LoadPostData and RaisePostBackEvent in custom control occurs, then Page_Load, then Render. It should stop at this point but sometimes LoadPostData and RaisePostBackEvent fire many times...
3
6280
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 not being called, even if the “__EVENTTARGET” value from the post collection was the same as the UniqueID of my control. After a while i discovered that the event was raised but for another control in the page. I read the msdn documentation on the...
0
1257
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 programmatically in some "slave" pages. In normal development, without Master Pages, I managed particular cases overriding RaisePostBackEvent function, provided from the page. This procedure works fine, in old applications.
0
8268
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
8202
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,...
1
8366
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
8510
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
7199
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...
0
4093
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...
0
4202
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2628
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
2
1512
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.