Note that there are some explanatory texts on larger screens.

plurals
  1. POASP.NET UserControl Help
    primarykey
    data
    text
    <p>i have a user control that i made, and i place two instances of that control on the same page... when i interact with the first control, it updates the elements (using ajax) of the first userControl, as it should. but when i do the same thing with the second userControl, it updates the elements on the first userControl as opposed to itself!!! this is really strange as nothing is declared as shared, and it looks like an instantiation problem.</p> <p>each userControl is wrapped around its own ajax updatepanel.</p> <p>any ideas anyone? is this a common pitfall?</p> <p>this is the structure of my code</p> <pre><code>&lt;@ Control Language="VB" ClassName="AgeRange"&gt; &lt;@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxCT"&gt; &lt;script runat="server"&gt; Delegate Sub NumberClickedEventHandler(ByVal sender As Object, ByVal e As EventArgs) Public Event NumberClicked As NumberClickedEventHandler Public Class NumberClickedEventArgs ' EVENT ARGS CLASS End Class Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) ' PAGE LOAD STUFF HERE End Sub Public Property A FEW PROPERTIES HERE Protected Function GetHTML(ByRef lastNumber As Byte, Optional ByVal FromNo As Byte = 18, Optional ByVal bForPopDown As Boolean = False, Optional ByVal bForPopUp As Boolean = False) As String SOME CODE HERE End Sub </code></pre> <p>--</p> <pre><code>&lt;asp:UpdatePanel ID="upAgeRange" runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional" ClientIDMode="Static" &lt;ContentTemplate&gt; &lt;table&gt;&lt;tr&gt; &lt;td&gt; &lt;span id="spanPopUp" runat="server"&gt; &lt;/span&gt; &lt;div id="dPanel" runat="server"&gt; &lt;/div&gt; &lt;span id="spanPopDown" runat="server"&gt; &lt;/span&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;AjaxCT:HoverMenuExtender ID="hmeUp" runat="server" TargetControlID="dPanel" PopupControlID="spanPopUp" OffsetY="-200"&gt; &lt;/AjaxCT:HoverMenuExtender&gt; &lt;AjaxCT:HoverMenuExtender ID="hmeDown" runat="server" TargetControlID="dPanel" PopupControlID="spanPopDown" OffsetY="60"&gt; &lt;/AjaxCT:HoverMenuExtender&gt; &lt;/ContentTemplate&gt; &lt;/asp:UpdatePanel&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload