I'm trying to make a self contained user control that is dynamically loaded to a page's UpdatePanel via links on the main page. The problem I am having is that I have never been able to fire the Click event of a button inside of the UserControl. The button should not affect the outer page at all and is simply trying to run a query against a DataGrid within the same UserControl
I have set the ChildrenAsTriggers property of the containing UpdatePanel to false as nothing inside any of these UserControl objects should manipulate anything outside of itself.
Here is what I have:
<asp:UpdatePanel ID="Updater" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
<ContentTemplate>
</ContentTemplate>
</asp:UpdatePanel>
In addition, I have a simple asp:Button inside of the dynamically loaded UserControl that will eventually be contained in the UpdatePanel's ContentTemplate:
<asp:Button runat="server" ID="ButtonGo" Text="Go" />
And a click handler in the code behind:
Public Sub ButtonGo_Click() Handles ButtonGo.Click
//Trying to break here
End Sub
I've seen many questions regarding this that all deal with non-dynamic, XAML-in-place content, but can't find anything for my situation.
How do I access the click event of the button, or perhaps, what am I setting up incorrectly to prevent the event from occurring?
Aucun commentaire:
Enregistrer un commentaire