G
Guest
hey all,
i have a datalist which contains linkbuttons. i'd like to add the
LinkButton_click event to the update panel triggers. I'm assuming i have to
do this in the code-behind and here's what i have so far and my best guess
but still posts back:
protected void DataList1_ItemDataBound(object sender,
DataListItemEventArgs e)
{
UpdatePanel updPanel =
(UpdatePanel)this.form1.FindControl("UpdatePanel1");
LinkButton lnkButton = (LinkButton)e.Item.FindControl("LinkButton1");
AsyncPostBackTrigger trg = new AsyncPostBackTrigger();
trg.ControlID = lnkButton.ClientID; //also tried .ID
trg.EventName = "Click";
updPanel.Triggers.Add(trg);
}
thanks,
rodchar
i have a datalist which contains linkbuttons. i'd like to add the
LinkButton_click event to the update panel triggers. I'm assuming i have to
do this in the code-behind and here's what i have so far and my best guess
but still posts back:
protected void DataList1_ItemDataBound(object sender,
DataListItemEventArgs e)
{
UpdatePanel updPanel =
(UpdatePanel)this.form1.FindControl("UpdatePanel1");
LinkButton lnkButton = (LinkButton)e.Item.FindControl("LinkButton1");
AsyncPostBackTrigger trg = new AsyncPostBackTrigger();
trg.ControlID = lnkButton.ClientID; //also tried .ID
trg.EventName = "Click";
updPanel.Triggers.Add(trg);
}
thanks,
rodchar