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...Module ForumsModule ForumsStoreStoreCritical error "allpas de definition et aucun argument de type"Critical error "allpas de definition et aucun argument de type"
Previous
 
Next
New Post
9/2/2009 8:59 AM
 

Hi all

I try to add 2checkout provider in that DNN Store module. 2Checkout Admin parameters have been added and now I can choose between Authorize.net, paypal, email payment and 2Checkout in administration settings. But I'm stuck on 2Checkout payment. Here is the btnConfimOrder (Button1) code :

TwoCheckoutPayment.ascx :

 <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />
 

TwoCheckoutPayment.ascx.cs :

using System;
using System.Collections;
using System.IO;
using System.Net;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Globalization;
using DotNetNuke;
using DotNetNuke.Modules.Store.Admin;
using DotNetNuke.Modules.Store.Cart;
using DotNetNuke.Modules.Store.Components;
using DotNetNuke.Modules.Store.Customer;
using DotNetNuke.Modules.Store.Providers.Address;
using DotNetNuke.Services.Exceptions;
using DotNetNuke.Services.Localization;

namespace DotNetNuke.Modules.Store.Cart
{
    public partial class TwoCheckoutPayment : PaymentControlBase
    {
        #region Private Declarations
       
        #endregion

        #region Web form Designer generated code
        override protected void OnInit(System.EventArgs e)
        {           
            base.OnInit(e);
        }       
        #endregion

        #region Events

        protected void Page_Load(System.Object sender, System.EventArgs e)
        {
                    
        }

        private static string CookieName = "DotNetNuke_Store_Portal_";

        #endregion     

        protected void Button1_Click(System.Object sender, System.EventArgs e)
        {
            System.Console.WriteLine("vita");
            return;
        }
    }
}

And the error :

A critical error has occurred.
c:\DotNetNuke_2\DesktopModules\Store\Providers\GatewayProviders\TwoCheckoutProvider\TwoCheckoutPayment.ascx(7): error CS1061: 'ASP.desktopmodules_store_providers_gatewayproviders_twocheckoutprovider_twocheckoutpayment_ascx' ne contient pas une définition pour 'Button1_Click' et aucune méthode d'extension 'Button1_Click' acceptant un premier argument de type 'ASP.desktopmodules_store_providers_gatewayproviders_twocheckoutprovider_twocheckoutpayment_ascx' n'a été trouvée (une directive using ou une référence d'assembly est-elle manquante ?)

Thank you in advance for your help

Bye.

 
New Post
9/9/2009 10:25 AM
 

Hi,

This look like a typical C# coding error, not related to the Store module! Try to add this piece of code: Button1.Click += new EventHandler(Button1_Click); inside the OnInit method just before base.OnInit(e);.

Gilles


We (team members) are Humans offering their knowledge, their work and their spare time FOR FREE to benefit the community. It would be so particularly appreciated that your messages begin with "Hello" and end with "Thank you" or any other form of politeness. Ask yourself what your reaction would be, if you were approached by me (a total stranger) on the street to ask you something without saying "Hello" nor "Thank you"? After several years of services dedicated to the community, I begin to be tired to read requests without any form of politeness.
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsStoreStoreCritical error "allpas de definition et aucun argument de type"Critical error "allpas de definition et aucun argument de type"


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