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

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPICallback not work Dotnetnuke 5.0 !Callback not work Dotnetnuke 5.0 !
Previous
 
Next
New Post
1/9/2009 3:02 AM
 

  I develop a callback simple dotnetnuke module. I do the need in ClienAPICallback.pdf . But my callback module go to "errorFunc" in javascript.

 My server code : 

 partial class ViewYourProfile : PortalModuleBase, IClientAPICallbackEventHandler
    {
        #region Event Handlers

        protected void Page_Load(System.Object sender, System.EventArgs e)
        {
            try
            {
                if (ClientAPI.BrowserSupportsFunctionality(ClientAPI.ClientFunctionality.XML) && ClientAPI.BrowserSupportsFunctionality(ClientAPI.ClientFunctionality.XMLHTTP))
                {
                    ClientAPI.RegisterClientReference(this.Page, ClientAPI.ClientNamespaceReferences.dnn_xml);
                    ClientAPI.RegisterClientReference(this.Page, ClientAPI.ClientNamespaceReferences.dnn_xmlhttp);
                }
                
                drdCountry.Attributes.Add("onchange", ClientAPI.GetCallbackEventReference(Page, "'test'", "successFunc", "this", "errorFunc",ClientAPI.DNNVARIABLE_CONTROLID));

            }
            catch (Exception exc) //Module failed to load
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }
        }

        #endregion

        #region CallBack Inheritance
        public string RaiseClientAPICallbackEvent(string argument)
        {
            return "test";
        }
        #endregion

    }

My client code:

<script type="text/javascript">
    function successFunc(result, ctx) {
        Test");  

    }
  
    function errorFunc(result, ctx) {
        Error'+ctx.id);
    }
</script>
<div>
    <asp:DropDownList ID="drdCountry" runat="server">
        <asp:ListItem Enabled="true" Text="VietNam"></asp:ListItem>
        <asp:ListItem Enabled="true" Text="UnitedState"></asp:ListItem>
        <asp:ListItem Enabled="true" Text="Japan"></asp:ListItem>
    </asp:DropDownList>
    <asp:DropDownList ID="drdCity" runat="server" ></asp:DropDownList>
</div>

 Result callback always "errorFunc" .

I don't about this error. Help me. Thanks you.

 
New Post
1/9/2009 9:14 AM
 

Can I suggest trying the C# sample template found at http://www.codeplex.com/codeendeavortemplate


 
New Post
1/12/2009 10:51 PM
 

 

 OK. I have install codeendeavortemplate for DNN 5.0. But i see that DestopModule not have CodeBehind " .ascx.cs" code server. I think template not have CodeBehind will be difficult developed. When modified , builded again and installed again the module. It was waste time. Can you help me that problem.

 

 
New Post
1/12/2009 11:51 PM
 

Very confused.  Did you follow the simple steps outlined in the video that was on the site? 

If you don't see the ascx.cs file, what do you see?  Did you create a new project in Visual Studio?  Did you choose VB or C#?


 
New Post
1/13/2009 8:20 AM
 

I used "MSBuild.Community.Tasks" to build my project. It build .dll and add to the "bin" folder of  Dotnetnuke website. Then I installed module with the .zip file. Then in DesktopModule has the module that I installed. But there are not ".ascx.cs" of  user custom controls . I want to debug direct the module when modify it. Code in ".ascx.cs" are builded to dll ?  I add the ".ascx.cs" to the custom control. But not work.

 

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPICallback not work Dotnetnuke 5.0 !Callback not work Dotnetnuke 5.0 !


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