Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesBEst way to call codebehind functions from javascriptBEst way to call codebehind functions from javascript
Previous
 
Next
New Post
8/4/2010 12:23 AM
 
I have been searching all over the place but am unable to get a definitive answer to which is the best way to execute code behind functions from javascript from a custom DNN module. I have looked over the ClientAPI documentation but this looks to be no longer up to date. Can anybody point me to up to date documentation or sample code?
 
New Post
8/10/2010 7:52 AM
 
I'm using Jayrock JSON-RPC to expose server side code as javascript callable function. Take a look at my javascript editing module at http://scriptagility.codeplex.com.

Jimmy Merari
 
New Post
8/12/2010 12:20 AM
 
I have had very good success using PageMethods and jQuery.   I have also called the post back methods from JavaScript.

Aaron Jackson
 
New Post
8/12/2010 11:04 AM
 
Thanks for your reply. I have taken a look at Jayrock but am not convinced this is the way to go. It requires making a change to the web.config and it looks like it would be just as easy to set up an asmx webservice. Please correct me if I am wrong and there is a great hidden benefit to using this method.
 
New Post
8/12/2010 11:10 AM
 
Hi Aaron,

Can you clarify how you are using Pagemethods? As a DNN module is a webusercontrol it is not possible to use pagemethods in your control, as far as I know.
Regarding postback from javascript, this is exactly what I am trying to prevent. I am looking for the best way to create interaction between javascript and serverside code without doing full postbacks. So far I have found 2 ways of doing it using the dnn client API and 1 by using asmx webservices(where I use some of the IWeb module's classes for securing calls to the webservices)
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesBEst way to call codebehind functions from javascriptBEst way to call codebehind functions from javascript


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out