Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Using Update Panel and Listview in User Control

$
0
0

Hi All,

I have a .aspx page in which there is a user control. The user control uses an update panel and some listviews. Each listview contains a link button. I am trying to add trigger dynaimcally in usercontrol codebehind. But i am getting the followinf error

"A control with ID 'lnkbtn' could not be found for the trigger in UpdatePanel 'updpnl".

Below is the code for .ascx.cs page

LinkButton lnkbtn1 = (LinkButton)lstvwCategories.FindControl("lnkbtnCategories");
        AsyncPostBackTrigger aspTrigger = new AsyncPostBackTrigger();
        aspTrigger.ControlID = "lnkbtn1";
        aspTrigger.EventName = "click";
        updpnl.Triggers.Add(aspTrigger);

Any help would be appreciated.


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>