OnClick Again fires only Once - VB.NET
<p>I have an asp:ImageButton in a Datalist on a .aspx page. I also have an img control on the page which sits outside of the datatlist.  The datalist is used simply to generate thumbnails.  When one is clicked, the corresponding image should appear in the the larger img control.  The event fires once, but if I try to click on another thumbnail right after, it doesn't fire the event again.  However, if I wait 60-90 seconds, I can click on another thumbnail and the event will fire again.  I haven't a clue what would cause such a thing and it has been driving me crazy for 2 days now. I figure it must be something simple, but I've been search the internet for answers and can't seem to find one.  If anyone can help, it would be greatly appreciated! </p>

<p>The button code in the .aspx page is as follows:</p>

<pre><code>&lt;img height="15" src="images/1x1.gif"&gt;&lt;asp:image id="ProductImage" runat="server" height="209" width="309"/&gt;&amp;nbsp;

 &lt;asp:DataList id="MoreColors" runat="server" RepeatColumns="1" &gt;
         &lt;ItemTemplate&gt;
              &lt;table style: border="0" width="75"&gt;
              &lt;tr&gt;
              &lt;td style: width="75" valign="middle" align="right"&gt;
              &lt;asp:ImageButton  ID="imgBtn" runat="server" ImageUrl='&lt;%# "ProductImages/Thumbs/" + Eval("DetailImage")%&gt;' height="50" Width="50" OnCommand="imgBtn_Click"  CommandArgument='&lt;%# Container.ItemIndex %&gt;'/&gt; &lt;/a&gt;
              &lt;/tr&gt;
              &lt;/table&gt;
           &lt;/ItemTemplate&gt;
      &lt;/asp:DataList&gt;
</code></pre>

<p>The Code-behind in the Onclick event is as follows:</p>

<pre><code> Protected Sub imgBtn_Click(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.CommandEventArgs)

        Dim ib As ImageButton = DirectCast(sender, ImageButton)
        ProductImage.ImageUrl = ib.ImageUrl
        MoreColors.SelectedIndex = Convert.ToInt32(ib.CommandArgument)
        ProductImage.Focus()

    End Sub
</code></pre>

<p>The Page_Load code is as follows:</p>

<pre><code> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim ProductID As Integer = CInt(Request.Params("ProductID"))
        If Not Page.IsPostBack Then

            Dim ImageCatalogue As ASPNET.LOVEDAT.ProductsDB = New ASPNET.LOVEDAT.ProductsDB()

            MoreColors.DataSource = ImageCatalogue.GetThumbnails(ProductID)
            MoreColors.DataBind()

            Dim Colorlist As ASPNET.LOVEDAT.ProductsDB = New ASPNET.LOVEDAT.ProductsDB
            AvailableColors.DataSource = Colorlist.GetAvailableColors(ProductID)
            AvailableColors.DataValueField = "ColorID"
            AvailableColors.DataTextField = "ColorName"
            AvailableColors.DataBind()

            ' Obtain Product Details
            Dim products As ASPNET.LOVEDAT.ProductsDB = New ASPNET.LOVEDAT.ProductsDB()
            Dim myProductDetails As ASPNET.LOVEDAT.ProductDetailsList = products.GetProductDetail(ProductID)

            ' Update Controls with Product Details
            desc.Text = myProductDetails.Description
            UnitCost.Text = String.Format("{0:c}", myProductDetails.UnitCost)
            ProductName.Text = myProductDetails.ProductName
            SKU.Text = myProductDetails.SKU.ToString()
            ProductImage.ImageUrl = "ProductImages/" &amp; myProductDetails.ProductImage
            addToCart.NavigateUrl = "AddToCart.aspx?ProductID=" &amp; ProductID
            ReviewList.ProductID = ProductID
            AlsoBoughtList.ProductID = ProductID

        End If
    End Sub
</code></pre>
