Re: Event handler for a client side OWC component



You do the same thing in aspx as you do in asp

> > <script language="javascript" for="ChartSpace"
> > event="CommandBeforeExecute">
> > <script language="javascript" for="ChartSpace"
> > event="BeforeContextMenu">
> > <script language="javascript" for="ChartSpace" event="Click">

intellisense will complain at compile time because the schema will not recognize the for keyword. But it will work at run time.

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Download OWC Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $15.00
Need a free copy of VSTS 2008 w/ MSDN Premium?
http://msmvps.com/blogs/alvin/Default.aspx
-------------------------------------------------------


"nickless" <niranjan.vasisht@xxxxxxxxx> wrote in message news:c186fe36-dffa-4253-97f7-6c68033ca3ad@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Aug 27, 11:47 am, nickless <niranjan.vasi...@xxxxxxxxx> wrote:
On Aug 27, 3:13 am, "Alvin Bruney [ASP.NET MVP]" <vapor dan using hot





male spam filter> wrote:
> OWC is a client side object, it does not run on the server. Event > handlers
> in an aspx page execute on the server. What you want to do is simply > not
> possible because a client object cannot fire server side code. You will > need
> a bridge between the client and the server to accomplish that.

> --

> Regards,
> Alvin Bruney [MVP ASP.NET]

> [Shameless Author plug]
> Download OWC Black Book, 2nd Edition
> Exclusively onwww.lulu.com/owc$15.00
> Need a free copy of VSTS 2008 w/ MSDN > Premium?http://msmvps.com/blogs/alvin/Default.aspx
> -------------------------------------------------------

> "nickless" <niranjan.vasi...@xxxxxxxxx> wrote in message

>news:b0360501-3162-4463-acaf-29f88a5d1c0c@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

> > Hello Alvin,

> > There is an asp page that embeds the OWC object in the client and
> > defines event handlers like this:

> > <script language="javascript" for="ChartSpace"
> > event="CommandBeforeExecute">
> > <script language="javascript" for="ChartSpace"
> > event="BeforeContextMenu">
> > <script language="javascript" for="ChartSpace" event="Click">

> > how do i do the same in an aspx page (asp.net 2.0).
> > I have embedded the object in the aspx page (with clsid) properly, > > but
> > i do not know how to declare event handlers for it. the usual set of
> > EvenHandlers do not work for this object (onclick, onkeydown ...etc)
> > Also CommandBeforeExecute, BeforeContextMenu defined are not a part > > of
> > the intelliSense drop down.
> > Could you please suggest a method to do it.

> > Thanks in advance- Hide quoted text -

> - Show quoted text -

ok, that is understood. Thanks.
but i want to run some Javascript on the client when the user clicks
the Chartspace object embedded in the page.

Q1: I have ave embedded the object like this:
<object id="ChartSpace" classid="clsid:0002E55D-0000-0000-
C000-000000000046" onclick="showMessage();"></object>
but the call to showMessage doesnt fire ! am i missing something here?
(I have tried other events available ..like onKeyDown etc even they
dont fire)

Q2: Eventually if i get to the events to fire how do i declare custom
events such as CommandBeforeExecute or BeforeContextMenu used in asp
page
in the aspx page.

Thanks again- Hide quoted text -

- Show quoted text -

Hello Alvin,

I request you to take a look at the post and suggest a direction, I
have hit a dead end on this one.
will be very helpful to me.

Hoping you would reply!
Thanks

.



Relevant Pages

  • Re: Event handler for a client side OWC component
    ... in an aspx page execute on the server. ... possible because a client object cannot fire server side code. ...
    (microsoft.public.office.developer.web.components)
  • Re: Hiding logic on localhost-based html/aspx ...
    ... Script encoder, in classic ASP or you could compile your ASP.NET logic into ... >>> ASPX server-side code is not viewable to the client. ...
    (microsoft.public.inetserver.asp.general)
  • Re: Using GLOBAL.ASAX with Classic ASP?
    ... A way to do so would be to reference an ASPX page from your ASP page (for ... example client side using an IFRAME or à ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Comparison of web technologies - MGI vs ASP.NET
    ... You'll only be deploying the .aspx pages and subsequent ... >I am a .NET developer but have a potential client that is using a hosting ... > company that developed their current pages using MGI. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Securing Non ASP.Net Files
    ... For both ASP and ASPX pages there are two activities which you might wish to ... In order to ensure that scripts may not be downloaded, ... above and beyond the way IIS will natively treat ASP ...
    (microsoft.public.dotnet.framework.aspnet.security)

Quantcast