Ask a Question related to ASP.NET General, Design and Development.
-
Jonas Nilsson #1
ItemCommand Event fires twice
Hi!
I have a DataList with some linkbuttons, and when i click them the
eventhandler fires twice.
Is there a way around this?, it's the same problem with the repeater and
datagrid control also.
public void dblFolders_CommandHandler(object sender,
System.Web.UI.WebControls.DataListCommandEventArgs e)
{
if (e.CommandName=="MoveToFolder")
{
FillControls(e.CommandArgument.ToString()); // THIS WILL BE RUN TWICE
}
}
private void InitializeComponent()
{
this.dblFolders.ItemCommand += new
System.Web.UI.WebControls.DataListCommandEventHand ler(this.dblFolders_Comman
dHandler);
this.Load += new System.EventHandler(this.Page_Load);
}
/Jonas
Jonas Nilsson Guest
-
Event Fires after CreateChildControls
I have created a C# control that creates its objects within CreateChildControls. One of those objects is a button which I have attached to a... -
Dropdownlist onselectedIndexChanged event not fires
Hi All, I have 22 years of over all experience in programming but just recently started to learn WEB applications, and started to write my... -
Need help with ItemCommand event
I have on the same page this code: <script language="VB" runat="server"> ... ... Private Sub subDatagrid_ItemCommand(ByVal source As Object,... -
asp:textbox_TextChanged event no longer fires???
Hi, I have a textbox control with some typical textchanged event code. It has worked fine, but all of a suddent the event no longer fires when you... -
Page Load Event Fires Twice
This is a classic asp newsgroup. While you may be lucky enough to find a dotnet-savvy person here who can answer your question, you can eliminate... -
PJ #2
Re: ItemCommand Event fires twice
Have you wired up the event manually as well as defined it in your aspx
element text?
"Jonas Nilsson" <jonas_nilsson@hotmail.com> wrote in message
news:OExgeRAWDHA.2228@TK2MSFTNGP12.phx.gbl...System.Web.UI.WebControls.DataListCommandEventHand ler(this.dblFolders_Comman> Hi!
>
> I have a DataList with some linkbuttons, and when i click them the
> eventhandler fires twice.
>
> Is there a way around this?, it's the same problem with the repeater and
> datagrid control also.
> public void dblFolders_CommandHandler(object sender,
> System.Web.UI.WebControls.DataListCommandEventArgs e)
> {
> if (e.CommandName=="MoveToFolder")
> {
> FillControls(e.CommandArgument.ToString()); // THIS WILL BE RUN TWICE
> }
> }
>
> private void InitializeComponent()
> {
> this.dblFolders.ItemCommand += new
>> dHandler);
> this.Load += new System.EventHandler(this.Page_Load);
> }
>
> /Jonas
>
>
PJ Guest
-
Jonas Nilsson #3
Re: ItemCommand Event fires twice
Yes.
"PJ" <pjwalNOSPAM@hotmail.com> wrote in message
news:%23bSImhAWDHA.1620@TK2MSFTNGP12.phx.gbl...System.Web.UI.WebControls.DataListCommandEventHand ler(this.dblFolders_Comman> Have you wired up the event manually as well as defined it in your aspx
> element text?
>
> "Jonas Nilsson" <jonas_nilsson@hotmail.com> wrote in message
> news:OExgeRAWDHA.2228@TK2MSFTNGP12.phx.gbl...>> > Hi!
> >
> > I have a DataList with some linkbuttons, and when i click them the
> > eventhandler fires twice.
> >
> > Is there a way around this?, it's the same problem with the repeater and
> > datagrid control also.
> > public void dblFolders_CommandHandler(object sender,
> > System.Web.UI.WebControls.DataListCommandEventArgs e)
> > {
> > if (e.CommandName=="MoveToFolder")
> > {
> > FillControls(e.CommandArgument.ToString()); // THIS WILL BE RUN TWICE
> > }
> > }
> >
> > private void InitializeComponent()
> > {
> > this.dblFolders.ItemCommand += new
> >>> > dHandler);
> > this.Load += new System.EventHandler(this.Page_Load);
> > }
> >
> > /Jonas
> >
> >
>
Jonas Nilsson Guest
-
Jonas Nilsson #4
Re: ItemCommand Event fires twice
Thanks, now i works!
/Jonas
"Jonas Nilsson" <jonas_nilsson@hotmail.com> wrote in message
news:evPRYoAWDHA.2268@TK2MSFTNGP11.phx.gbl...and> Yes.
>
> "PJ" <pjwalNOSPAM@hotmail.com> wrote in message
> news:%23bSImhAWDHA.1620@TK2MSFTNGP12.phx.gbl...> > Have you wired up the event manually as well as defined it in your aspx
> > element text?
> >
> > "Jonas Nilsson" <jonas_nilsson@hotmail.com> wrote in message
> > news:OExgeRAWDHA.2228@TK2MSFTNGP12.phx.gbl...> > > Hi!
> > >
> > > I have a DataList with some linkbuttons, and when i click them the
> > > eventhandler fires twice.
> > >
> > > Is there a way around this?, it's the same problem with the repeaterSystem.Web.UI.WebControls.DataListCommandEventHand ler(this.dblFolders_Comman>> >> > > datagrid control also.
> > > public void dblFolders_CommandHandler(object sender,
> > > System.Web.UI.WebControls.DataListCommandEventArgs e)
> > > {
> > > if (e.CommandName=="MoveToFolder")
> > > {
> > > FillControls(e.CommandArgument.ToString()); // THIS WILL BE RUN TWICE
> > > }
> > > }
> > >
> > > private void InitializeComponent()
> > > {
> > > this.dblFolders.ItemCommand += new
> > >>> >> > > dHandler);
> > > this.Load += new System.EventHandler(this.Page_Load);
> > > }
> > >
> > > /Jonas
> > >
> > >
> >
>
Jonas Nilsson Guest



Reply With Quote

