Home All Groups Group Topic Archive Search About

DROPDOWNLIST SELECTEDINDEXCHANGED

Author
30 May 2005 7:22 PM
Jose Fernandez
Hola

Estoy haciendo un usercontrol que tiene un dropdownlist (id=Mes) y no me ejecuta el evento Mes_SelectedIndexChanged(object sender, EventArgs e)...

AutoEventWireUp es TRUE y tambien el autopostback...

alguien sabe que puede estar pasando?
aqui van los codigos...

<%@ Control Language="c#" AutoEventWireup="true" Codebehind="FechaPicker.ascx.cs" Inherits="Voluntarios.controls.FechaPicker" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<asp:DropDownList id="Dia" runat="server"></asp:DropDownList>
<asp:DropDownList id="Mes" AutoPostBack=True runat="server"></asp:DropDownList>
<asp:DropDownList id="Ano" AutoPostBack=True runat="server"></asp:DropDownList>
===============================================================
void Ano_SelectedIndexChanged(object sender, System.EventArgs e)

{

DateTime xFecha=new DateTime(Convert.ToInt32(Ano.SelectedItem.Value),MyDate.Month,MyDate.Day);

MyDate=xFecha;

}

private void Mes_SelectedIndexChanged(object sender, System.EventArgs e)

{

DateTime xFecha=new DateTime(MyDate.Year,Convert.ToInt32(Mes.SelectedItem.Value),MyDate.Day);

MyDate=xFecha;

}

Author
31 May 2005 3:31 AM
Marcos Mellibovsky
tenes agregada la rutina como controladora del evento?

Mes.SelectedIndexChanged += Mes_SelectedIndexChanged


--
Saludos
Marcos Mellibovsky
MCAD - MCSD - MCSE - MCDBA
Cordoba - Argentina
  "Jose Fernandez" <ppcu***@hotmail.com> escribió en el mensaje news:O%236VhzUZFHA.1088@TK2MSFTNGP14.phx.gbl...
  Hola

  Estoy haciendo un usercontrol que tiene un dropdownlist (id=Mes) y no me ejecuta el evento Mes_SelectedIndexChanged(object sender, EventArgs e)...

  AutoEventWireUp es TRUE y tambien el autopostback...

  alguien sabe que puede estar pasando?
  aqui van los codigos...

  <%@ Control Language="c#" AutoEventWireup="true" Codebehind="FechaPicker.ascx.cs" Inherits="Voluntarios.controls.FechaPicker" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
  <asp:DropDownList id="Dia" runat="server"></asp:DropDownList>
  <asp:DropDownList id="Mes" AutoPostBack=True runat="server"></asp:DropDownList>
  <asp:DropDownList id="Ano" AutoPostBack=True runat="server"></asp:DropDownList>
  ===============================================================
  void Ano_SelectedIndexChanged(object sender, System.EventArgs e)

  {

  DateTime xFecha=new DateTime(Convert.ToInt32(Ano.SelectedItem.Value),MyDate.Month,MyDate.Day);

  MyDate=xFecha;

  }

  private void Mes_SelectedIndexChanged(object sender, System.EventArgs e)

  {

  DateTime xFecha=new DateTime(MyDate.Year,Convert.ToInt32(Mes.SelectedItem.Value),MyDate.Day);

  MyDate=xFecha;

  }
Are all your drivers up to date? click for free checkup

Author
31 May 2005 3:21 PM
Jose Fernandez
Si, lo tengo....

acabo de hacer una paginita tonta, con un usercontrol embedded y en el
usercontrol un dropdown con un textbox y el evento selectedindex y me
funciona....
ahora si que no entiendo nada.
AYUDA POR FAVORRRRRR


private void InitializeComponent()
{
this.Mes.SelectedIndexChanged += new
System.EventHandler(this.Mes_SelectedIndexChanged);
this.Ano.SelectedIndexChanged += new
System.EventHandler(this.Ano_SelectedIndexChanged);
this.Load += new System.EventHandler(this.Page_Load);
}


"Marcos Mellibovsky" <lis***@arsoft.com.ar> wrote in message
news:OJ9zF$YZFHA.616@TK2MSFTNGP12.phx.gbl...
tenes agregada la rutina como controladora del evento?

Mes.SelectedIndexChanged += Mes_SelectedIndexChanged


--
Saludos
Marcos Mellibovsky
MCAD - MCSD - MCSE - MCDBA
Cordoba - Argentina
"Jose Fernandez" <ppcu***@hotmail.com> escribió en el mensaje
news:O%236VhzUZFHA.1088@TK2MSFTNGP14.phx.gbl...
Hola

Estoy haciendo un usercontrol que tiene un dropdownlist (id=Mes) y no me
ejecuta el evento Mes_SelectedIndexChanged(object sender, EventArgs e)...

AutoEventWireUp es TRUE y tambien el autopostback...

alguien sabe que puede estar pasando?
aqui van los codigos...

<%@ Control Language="c#" AutoEventWireup="true"
Codebehind="FechaPicker.ascx.cs" Inherits="Voluntarios.controls.FechaPicker"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<asp:DropDownList id="Dia" runat="server"></asp:DropDownList>
<asp:DropDownList id="Mes" AutoPostBack=True
runat="server"></asp:DropDownList>
<asp:DropDownList id="Ano" AutoPostBack=True
runat="server"></asp:DropDownList>
===============================================================
void Ano_SelectedIndexChanged(object sender, System.EventArgs e)
{
DateTime xFecha=new
DateTime(Convert.ToInt32(Ano.SelectedItem.Value),MyDate.Month,MyDate.Day);
MyDate=xFecha;
}
private void Mes_SelectedIndexChanged(object sender, System.EventArgs e)
{
DateTime xFecha=new
DateTime(MyDate.Year,Convert.ToInt32(Mes.SelectedItem.Value),MyDate.Day);
MyDate=xFecha;
}
Author
31 May 2005 3:52 PM
Jose Fernandez
Realmente estoy desesperado. necesito resolver este problema pues tengo solo
esta semana para entregar este trabajo.
los que quieran el codigo fuente completo de estas paginas, escribanme a mi
correo y se los mando.
aprecio muchisimo cualquier ayuda que puedan darme.
Jose ppcu***@hotmail.com


Show quoteHide quote
"Jose Fernandez" <ppcu***@hotmail.com> wrote in message
news:uWAzASfZFHA.3272@TK2MSFTNGP14.phx.gbl...
> Si, lo tengo....
>
> acabo de hacer una paginita tonta, con un usercontrol embedded y en el
> usercontrol un dropdown con un textbox y el evento selectedindex y me
> funciona....
> ahora si que no entiendo nada.
> AYUDA POR FAVORRRRRR
>
>
> private void InitializeComponent()
> {
> this.Mes.SelectedIndexChanged += new
> System.EventHandler(this.Mes_SelectedIndexChanged);
> this.Ano.SelectedIndexChanged += new
> System.EventHandler(this.Ano_SelectedIndexChanged);
> this.Load += new System.EventHandler(this.Page_Load);
> }
>
>
> "Marcos Mellibovsky" <lis***@arsoft.com.ar> wrote in message
> news:OJ9zF$YZFHA.616@TK2MSFTNGP12.phx.gbl...
> tenes agregada la rutina como controladora del evento?
>
> Mes.SelectedIndexChanged += Mes_SelectedIndexChanged
>
>
> --
> Saludos
> Marcos Mellibovsky
> MCAD - MCSD - MCSE - MCDBA
> Cordoba - Argentina
> "Jose Fernandez" <ppcu***@hotmail.com> escribió en el mensaje
> news:O%236VhzUZFHA.1088@TK2MSFTNGP14.phx.gbl...
> Hola
>
> Estoy haciendo un usercontrol que tiene un dropdownlist (id=Mes) y no me
> ejecuta el evento Mes_SelectedIndexChanged(object sender, EventArgs e)...
>
> AutoEventWireUp es TRUE y tambien el autopostback...
>
> alguien sabe que puede estar pasando?
> aqui van los codigos...
>
> <%@ Control Language="c#" AutoEventWireup="true"
> Codebehind="FechaPicker.ascx.cs"
> Inherits="Voluntarios.controls.FechaPicker"
> TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
> <asp:DropDownList id="Dia" runat="server"></asp:DropDownList>
> <asp:DropDownList id="Mes" AutoPostBack=True
> runat="server"></asp:DropDownList>
> <asp:DropDownList id="Ano" AutoPostBack=True
> runat="server"></asp:DropDownList>
> ===============================================================
> void Ano_SelectedIndexChanged(object sender, System.EventArgs e)
> {
> DateTime xFecha=new
> DateTime(Convert.ToInt32(Ano.SelectedItem.Value),MyDate.Month,MyDate.Day);
> MyDate=xFecha;
> }
> private void Mes_SelectedIndexChanged(object sender, System.EventArgs e)
> {
> DateTime xFecha=new
> DateTime(MyDate.Year,Convert.ToInt32(Mes.SelectedItem.Value),MyDate.Day);
> MyDate=xFecha;
> }
>
>
>
Author
31 May 2005 5:31 PM
Jose Fernandez
YA
la solucion esta aqui....
El problema era que en esa misma pagina estaba otro usercontrol que tenia un
codigo html y dentro habia un form (del antiguo ASP) y por lo tanto no
permitia hacer postback a la pagina. Por eso era que yo usaba el mismo
usercontrol en otras paginas y me pinchaba bien sin problemas.....
Les agradezco de todos modos la atencion.
un abrazo

Show quoteHide quote
"Jose Fernandez" <ppcu***@hotmail.com> wrote in message
news:eddRRjfZFHA.1384@TK2MSFTNGP09.phx.gbl...
> Realmente estoy desesperado. necesito resolver este problema pues tengo
> solo esta semana para entregar este trabajo.
> los que quieran el codigo fuente completo de estas paginas, escribanme a
> mi correo y se los mando.
> aprecio muchisimo cualquier ayuda que puedan darme.
> Jose ppcu***@hotmail.com
>
>
> "Jose Fernandez" <ppcu***@hotmail.com> wrote in message
> news:uWAzASfZFHA.3272@TK2MSFTNGP14.phx.gbl...
>> Si, lo tengo....
>>
>> acabo de hacer una paginita tonta, con un usercontrol embedded y en el
>> usercontrol un dropdown con un textbox y el evento selectedindex y me
>> funciona....
>> ahora si que no entiendo nada.
>> AYUDA POR FAVORRRRRR
>>
>>
>> private void InitializeComponent()
>> {
>> this.Mes.SelectedIndexChanged += new
>> System.EventHandler(this.Mes_SelectedIndexChanged);
>> this.Ano.SelectedIndexChanged += new
>> System.EventHandler(this.Ano_SelectedIndexChanged);
>> this.Load += new System.EventHandler(this.Page_Load);
>> }
>>
>>
>> "Marcos Mellibovsky" <lis***@arsoft.com.ar> wrote in message
>> news:OJ9zF$YZFHA.616@TK2MSFTNGP12.phx.gbl...
>> tenes agregada la rutina como controladora del evento?
>>
>> Mes.SelectedIndexChanged += Mes_SelectedIndexChanged
>>
>>
>> --
>> Saludos
>> Marcos Mellibovsky
>> MCAD - MCSD - MCSE - MCDBA
>> Cordoba - Argentina
>> "Jose Fernandez" <ppcu***@hotmail.com> escribió en el mensaje
>> news:O%236VhzUZFHA.1088@TK2MSFTNGP14.phx.gbl...
>> Hola
>>
>> Estoy haciendo un usercontrol que tiene un dropdownlist (id=Mes) y no me
>> ejecuta el evento Mes_SelectedIndexChanged(object sender, EventArgs e)...
>>
>> AutoEventWireUp es TRUE y tambien el autopostback...
>>
>> alguien sabe que puede estar pasando?
>> aqui van los codigos...
>>
>> <%@ Control Language="c#" AutoEventWireup="true"
>> Codebehind="FechaPicker.ascx.cs"
>> Inherits="Voluntarios.controls.FechaPicker"
>> TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
>> <asp:DropDownList id="Dia" runat="server"></asp:DropDownList>
>> <asp:DropDownList id="Mes" AutoPostBack=True
>> runat="server"></asp:DropDownList>
>> <asp:DropDownList id="Ano" AutoPostBack=True
>> runat="server"></asp:DropDownList>
>> ===============================================================
>> void Ano_SelectedIndexChanged(object sender, System.EventArgs e)
>> {
>> DateTime xFecha=new
>> DateTime(Convert.ToInt32(Ano.SelectedItem.Value),MyDate.Month,MyDate.Day);
>> MyDate=xFecha;
>> }
>> private void Mes_SelectedIndexChanged(object sender, System.EventArgs e)
>> {
>> DateTime xFecha=new
>> DateTime(MyDate.Year,Convert.ToInt32(Mes.SelectedItem.Value),MyDate.Day);
>> MyDate=xFecha;
>> }
>>
>>
>>
>
>

Bookmark and Share

Post Thread options