Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Hola amigos, estoy empezando en la programacion C# asp.net y tengo este problema que ya me esta quitando mucho tiempo, y creo que para alguno de ustedes debe ser de lo mas sencillo de resolver.
 
Me esta generando el error en "public repeaterCEA(int idLote)" que dice "System.Web.UI.WebControls.RepeaterCommandEventArgs no contiene un constructor que tome 0 argumentos.
 
El codigo es el siguiente:
 
namespace SIISA.Controls.lotes
{
    public partial class ctrListaLotesConsolidados : System.Web.UI.UserControl
    {
        public delegate void RepeaterCommandEventHandler(repeaterCEA e);
        public event RepeaterCommandEventHandler RepeaterSelectedAction;
 
        public class repeaterCEA: RepeaterCommandEventArgs
        {            
            public Int32 idLote { get; protected set; }
 
            public repeaterCEA(int idLote)
            {
                this.idLote = idLote;
            }            
        }       
    }
}
Espero que me puedan ayudar,
 
Gracias de antemano.
 
Hello friends, I'm starting programming in C # asp.net and I have this problem that is keeping me awake a long time, and I think for any of you should be very simple to solve.

I is generating the error "public repeaterCEA (int idLote)" that says "System.Web.UI.WebControls.RepeaterCommandEventArgs not contain a constructor that takes 0 arguments.

The code is as follows:
Posted 28-Aug-12 11:49am
Edited 28-Aug-12 11:57am
Wes Aday86.8K
v2
Comments
Christian Amado at 28-Aug-12 19:44pm
   
Hola que tal? En este sitio sólo escribimos en ingles. Hi How are you doing? In this site we just write in English =)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Hi,
 
When you have class with parametrized construction it must have default constructor in it. So your code should be like,
 
public class repeaterCEA: RepeaterCommandEventArgs
        {
            public Int32 idLote { get; protected set; }
            // Default constructor added.
            public repeaterCEA() 
            {}
            public repeaterCEA(int idLote)
            {
                this.idLote = idLote;
            }
        }
 
Hope you got it.
 
Thanks
-Amit Gajjar
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

You are extending from an Event class, so this will not work. delete the RepeaterCommandEventArgs from there.
 
What are you trying to do?
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 453
1 CPallini 333
2 George Jonsson 270
3 OriginalGriff 159
4 Prasad Khandekar 135
0 OriginalGriff 4,613
1 CPallini 3,340
2 Sergey Alexandrovich Kryukov 2,879
3 George Jonsson 2,264
4 Gihan Liyanage 2,020


Advertise | Privacy | Mobile
Web04 | 2.8.140905.1 | Last Updated 29 Aug 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100