473,395 Members | 1,377 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.

How to Cancel a "non cancellable" Event

I'm using a 3rd party component in an ASP.NET 1.1 Web application. The
component has a .Click event that can be fired from the client, with an
associated event procedure in the code-behind module.

The logic in the click event procedure may, under some conditions, need to
abort further processing. AFAIK the control's event is not cancellable. At
least its EventArgs does not have any apparent support for .Cancel.

So, what can I do to completely abort further processing from within the
click event procedure (i.e., cancel the event)? Please note...

.... I cannot simply have a try/catch block and throw an exception in order
to cancel the event processing - BECAUSE when my code is finished executing
(regardless of what it does or does not do), the 3rd Party component
transferes the user to another Web site (the site of the component's
vendor). It essentially POSTs some data to the vendor's web site - and I
want to be able to abort this POST operation which is performed by the 3rd
party component after any of my code in its click event procedure executes.

Thanks!
Nov 17 '05 #1
5 2019
Hey Verde,

If you're trying to circumvent the components licencing you won't get
much help here.

Just my 2 pence
Jan

Nov 17 '05 #2
You read way too much into my post while obviously not reading it carefully.

FWIW: This component is *free* and I'm just trying to work around a
shortcoming of the vendor. Trying to cancel an event to *prevent* the
primary and fundamental functionality of the component - BY DEFINITION - is
NOT me trying to get that functionality to happen for free. I'm trying to
get it to NOT happen under certain runtime conditions. They provided a click
event in their component that is not cancellable - thereby presenting a
slippery slope for my users. Once they click it there is no turning back. I
have no chance to validate the data and cancel the event when the data isn't
valid. That's not me stealing anything. That's me trying to provide a more
robust application for my users that integrates with the 3rd party site in a
safe way.

Thanks to you, other people will likely not respond to my post in any
relevant and useful way because they may think that I'm trying to steal
something.

-V
"Jan Bannister (jancsharp.blogspot.com)" <ja***********@gmail.com> wrote in
message news:11*********************@g14g2000cwa.googlegro ups.com...
Hey Verde,

If you're trying to circumvent the components licencing you won't get
much help here.

Just my 2 pence
Jan

Nov 17 '05 #3
You could put your own button on top of that component's button.
if the user clicks on your button and you have validated your data do a
button.performclick() on the button of that component.
but there is one problem: you have to get a reference to that button first..
maybe you can loop through the ControlsCollection of the component to find
it.
"Verde" <VF******@BeansAndTacos.net> schrieb im Newsbeitrag
news:uF**************@TK2MSFTNGP10.phx.gbl...
You read way too much into my post while obviously not reading it
carefully.

FWIW: This component is *free* and I'm just trying to work around a
shortcoming of the vendor. Trying to cancel an event to *prevent* the
primary and fundamental functionality of the component - BY DEFINITION -
is NOT me trying to get that functionality to happen for free. I'm trying
to get it to NOT happen under certain runtime conditions. They provided a
click event in their component that is not cancellable - thereby
presenting a slippery slope for my users. Once they click it there is no
turning back. I have no chance to validate the data and cancel the event
when the data isn't valid. That's not me stealing anything. That's me
trying to provide a more robust application for my users that integrates
with the 3rd party site in a safe way.

Thanks to you, other people will likely not respond to my post in any
relevant and useful way because they may think that I'm trying to steal
something.

-V
"Jan Bannister (jancsharp.blogspot.com)" <ja***********@gmail.com> wrote
in message news:11*********************@g14g2000cwa.googlegro ups.com...
Hey Verde,

If you're trying to circumvent the components licencing you won't get
much help here.

Just my 2 pence
Jan


Nov 17 '05 #4
Thank you cody.

Your advice is exactly what I eventually figured out how to do last night
after the initial post. It works great! The 3rd party component now never
even appears in the UI and I still get to leverage its useful functionality.
I now validate the data, if it's all cool I then instantiate the 3rd party
component, set various other properties of the component and then fire its
click event. The *validated* data + user gets routed to the 3rd party site.

-V
"cody" <de********@gmx.de> wrote in message
news:uV**************@TK2MSFTNGP09.phx.gbl...
You could put your own button on top of that component's button.
if the user clicks on your button and you have validated your data do a
button.performclick() on the button of that component.
but there is one problem: you have to get a reference to that button
first..
maybe you can loop through the ControlsCollection of the component to find
it.
"Verde" <VF******@BeansAndTacos.net> schrieb im Newsbeitrag
news:uF**************@TK2MSFTNGP10.phx.gbl...
You read way too much into my post while obviously not reading it
carefully.

FWIW: This component is *free* and I'm just trying to work around a
shortcoming of the vendor. Trying to cancel an event to *prevent* the
primary and fundamental functionality of the component - BY DEFINITION -
is NOT me trying to get that functionality to happen for free. I'm trying
to get it to NOT happen under certain runtime conditions. They provided a
click event in their component that is not cancellable - thereby
presenting a slippery slope for my users. Once they click it there is no
turning back. I have no chance to validate the data and cancel the event
when the data isn't valid. That's not me stealing anything. That's me
trying to provide a more robust application for my users that integrates
with the 3rd party site in a safe way.

Thanks to you, other people will likely not respond to my post in any
relevant and useful way because they may think that I'm trying to steal
something.

-V
"Jan Bannister (jancsharp.blogspot.com)" <ja***********@gmail.com> wrote
in message news:11*********************@g14g2000cwa.googlegro ups.com...
Hey Verde,

If you're trying to circumvent the components licencing you won't get
much help here.

Just my 2 pence
Jan



Nov 17 '05 #5
.... and for those interested, in ASP.NET (i.e., WebForms) it's not
button.performclick(), rather it is object.RaisePostBackEvent("click") -
like this:
some3rdPartyComponent.RaisePostBackEvent("click");


"Verde" <VF******@BeansAndTacos.net> wrote in message
news:uZ**************@TK2MSFTNGP09.phx.gbl...
Thank you cody.

Your advice is exactly what I eventually figured out how to do last night
after the initial post. It works great! The 3rd party component now never
even appears in the UI and I still get to leverage its useful
functionality. I now validate the data, if it's all cool I then
instantiate the 3rd party component, set various other properties of the
component and then fire its click event. The *validated* data + user gets
routed to the 3rd party site.

-V
"cody" <de********@gmx.de> wrote in message
news:uV**************@TK2MSFTNGP09.phx.gbl...
You could put your own button on top of that component's button.
if the user clicks on your button and you have validated your data do a
button.performclick() on the button of that component.
but there is one problem: you have to get a reference to that button
first..
maybe you can loop through the ControlsCollection of the component to
find it.
"Verde" <VF******@BeansAndTacos.net> schrieb im Newsbeitrag
news:uF**************@TK2MSFTNGP10.phx.gbl...
You read way too much into my post while obviously not reading it
carefully.

FWIW: This component is *free* and I'm just trying to work around a
shortcoming of the vendor. Trying to cancel an event to *prevent* the
primary and fundamental functionality of the component - BY DEFINITION -
is NOT me trying to get that functionality to happen for free. I'm
trying to get it to NOT happen under certain runtime conditions. They
provided a click event in their component that is not cancellable -
thereby presenting a slippery slope for my users. Once they click it
there is no turning back. I have no chance to validate the data and
cancel the event when the data isn't valid. That's not me stealing
anything. That's me trying to provide a more robust application for my
users that integrates with the 3rd party site in a safe way.

Thanks to you, other people will likely not respond to my post in any
relevant and useful way because they may think that I'm trying to steal
something.

-V
"Jan Bannister (jancsharp.blogspot.com)" <ja***********@gmail.com> wrote
in message news:11*********************@g14g2000cwa.googlegro ups.com...
Hey Verde,

If you're trying to circumvent the components licencing you won't get
much help here.

Just my 2 pence
Jan



Nov 17 '05 #6

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

Similar topics

2
by: Adrian Parker | last post by:
For some reason when I call validateFields before .Update (see below), I get this error: "Consumer's even handler called a non-reentrant method in the provider" However if I comment out the...
14
by: mirnazim | last post by:
Hi, There are great Python Web Application Framework. But most of them are meant for content oriented web apps. Is there something that can ease the development of application that are not...
1
by: JKop | last post by:
Would you classify the following code as "Undefined Behaviour" or as "Non- portable"? signed main() { signed char chedder = 130; } Relevant information:
15
by: Sander Tekelenburg | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The HTML specs speak of "replaced" and "non-replaced" elements, yet for the life of me I can't find an explanation of what "replaced" is supposed...
8
by: Bern McCarty | last post by:
Is it at all possible to leverage mixed-mode assemblies from AppDomains other than the default AppDomain? Is there any means at all of doing this? Mixed-mode is incredibly convenient, but if I...
2
by: thorax | last post by:
I'm having problems running a release build of an application. The application is a native C++ .NET 2003 MFC application which links to a number of other DLLs, one of which is mixed (SLGSE.dll)...
7
by: Benton | last post by:
Hi there, I have a text box which will receive its value from a pop-up date picker. The user should not be able to edit this field with the keyboard or mouse. I am using ASP.NET. If I set the...
3
by: Arnost Sobota | last post by:
Dear ASP community, I have a question regarding ASP session variables. My assumption was that a session variable has the same lifetime as the session itself: as a consequence, given that...
1
by: =?Utf-8?B?QWxleCBNYWdoZW4=?= | last post by:
Hi. I have Mobile site that I'm building. My problem is that all of my pages are built as Mobile ASPX pages, but occasionally, I need to use controls which are not mobile. Most specifically, the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
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,...
0
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...
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...

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.