calling cs method from javascript

Discussion in 'ASP .Net' started by Benny, Nov 10, 2003.

  1. Benny

    Benny Guest

    hello all,

    currently im working on an asp.net web application using c#.

    im able to calling a javascript funtion in the .aspx page from the
    .aspx.cs page method. however, now i want other way round. how can i
    call a .aspx.cs method from a javascript funtion in the .aspx page?

    thanks,

    benny

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Benny, Nov 10, 2003
    #1
    1. Advertising

  2. Benny

    Natty Gur Guest

    Hi,

    You can’t call directly method on the web page from client side
    javascript. You can use the postback mechanism to call the page and
    activate certain function ( you need to embed client side script that
    call __Postback with predefined __EventTarget. on the server side check
    __EventTarget form field and if it match your predefined function call
    the desire function).

    If all of your clients are using IE you can use xmlhttprequest or
    webservice.htc to call webservice function on the server side.

    Natty Gur[MVP]

    blog : http://weblogs.asp.net/ngur
    Mobile: +972-(0)58-888377


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Natty Gur, Nov 10, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jabel D. Morales - VMan of Mana

    Problems with JNI: calling a Java method from native method.

    Jabel D. Morales - VMan of Mana, Aug 1, 2003, in forum: Java
    Replies:
    1
    Views:
    4,874
    Joseph Millar
    Aug 1, 2003
  2. Replies:
    1
    Views:
    644
    Andrew Thompson
    Jan 28, 2007
  3. sck10
    Replies:
    0
    Views:
    367
    sck10
    Mar 15, 2007
  4. Erik
    Replies:
    11
    Views:
    655
    Peter Duniho
    Mar 29, 2008
  5. why-em-jay

    Calling a method of the calling object ...

    why-em-jay, Sep 15, 2005, in forum: Perl Misc
    Replies:
    3
    Views:
    187
    Anno Siegel
    Sep 15, 2005
Loading...

Share This Page