<asp:UpdatePanel ID="dd" runat="server" > <ContentTemplate> <asp:Button ID="AddToCart" runat = "server" Text='Add to Cart' BackColor="DarkSlateBlue" Width="100px" Style=" font-family:Arial" ForeColor="White" commandname="myevent"> </asp:Button> </ContentTemplate> </asp:UpdatePanel> </p> </td> </tr> </table> </ItemTemplate> <FooterStyle BackColor="AliceBlue" /> <FooterTemplate> <br /> <asp:Button ID="BtnCheckOut" runat = "server" Text='Checkout' Enabled="false" Width="100px" onclick="CheckOutBtn_Click" style="z-index: 1; width:80px;cursor:pointer; margin-left:350px ; font-family:Arial; text-align:center; height:22px; font-weight:600; " > </asp:Button> <br />
public void dl_item_command(Object sender, DataListCommandEventArgs e) { if (e.CommandName == "myevent") // check commandname here { v_FirstSessionTag = "*"; Session["FirstSessionTag"] = v_FirstSessionTag; Button CheckOutBtn = (Button)DataList1.Controls[DataList1.Controls.Count - 1].FindControl("BtnCheckOut"); CheckOutBtn.Enabled = true;
Button CheckOutBtn = dd.FindControl("BtnCheckOut") as Button; CheckOutBtn.Enabled = true;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)