Asp panel with asp timer not showing with buttons created in RadListView.

Muratweb

New Member
I have a control called "AddToBag". This control gets used in multiple spot throughout the page I'm working on. When the button stands alone, the onclick event when fired adds the item to the datatable and sets visibility to a panel to true. Inside of that panel resides an image that is wrapped in a timer that confirms that the item was added and then sets the panel visibility to false. There is a section of this page that I use a Radlistview which renders multiple instances of this button. Adding to the cart works, but the panel with the image timer does not visually appear. Add To Bag Control markup\[code\]<div id="bottomDetails" style="clear: left;"><asp:Label ID="lblQty" Text="Qty:" runat="server" /><telerik:RadNumericTextBox ID="txtQty" InvalidStyle-BackColor="Pink" CausesValidation="true" MinValue="http://stackoverflow.com/questions/13771301/1" Type="Number" ShowSpinButtons="true" runat="server" Width="45px" Value="http://stackoverflow.com/questions/13771301/1"><IncrementSettings Step="1" /><NumberFormat DecimalDigits="0" /></telerik:RadNumericTextBox><asp:Button ID="btnAddToBag" CssClass="btnAddToBag" Text="ADD TO CART" runat="server" BackColor="#A1749F" Font-Bold="True" ForeColor="White" CommandName="Product" OnCommand="btnAddToBag_Click" /><br /> \[/code\] Add To Bag Control C#\[code\] protected void Page_Load(object sender, EventArgs e) { //btnAddToBag.Click += new EventHandler(btnAddToBag_Click); Timer1.Tick += new EventHandler<EventArgs>(Timer1_Tick); } void Timer1_Tick(object sender, EventArgs e) { pnlWasAdded.Visible = false; Timer1.Enabled = false; } protected void btnAddToBag_Click(object sender, CommandEventArgs e) { string currentOrderGUID = ""; string currentProductGUID = ""; try { JJPro.Web.Page curPage = (JJPro.Web.Page)this.Page; currentOrderGUID = curPage.CurrentOrderGuid; } catch { } currentProductGUID = e.CommandArgument.ToString(); if (currentOrderGUID != null && currentOrderGUID.Length > 0 && currentOrderGUID != "00000000-0000-0000-0000-000000000000" && currentProductGUID != null && currentProductGUID.Length > 0 && currentProductGUID != "00000000-0000-0000-0000-000000000000") { int quantityToAdd = 0; Int32.TryParse(txtQty.Text, out quantityToAdd); if (quantityToAdd > 0) { CO.Unlock(new Guid(currentOrderGUID)); OE.AddToBag(new Guid(currentOrderGUID), new Guid(currentProductGUID), quantityToAdd); //lblAdded.Text = "Item was added."; pnlWasAdded.Visible = true; Timer1.Enabled = true; txtQty.Text = "1"; } } }\[/code\]Aspx where control is called as is in a RadListView. \[code\] <div style="float: left; clear: both;"> <JJ:AddToBag ID="objAddToBag" runat="server" ProductGuid='<%# Eval("ProductsGuid").ToString() %>' /> </div>\[/code\]I've set my panel's visibility to true to make sure it wasn't a layer issue and it displays on all instances of the button control. Any insight would be greatly appreciated.
 
Back
Top