Finding Div present inside the data list on runtime

murrayswan

New Member
I need to find the div which belongs my current clicked Link button from the code behind file in c#. Then i need to apply the class for that div. So far i tried to access by html table cell. But i cant able to access my div. So please any valuable suggestion to find the div?\[code\]<asp:DataList ID="DataList1" runat="server" OnItemCommand="DataList1_ItemCommand" style="width:100%"> <ItemTemplate> <div runat="server" id="DivContent" style="padding-top: 25px; height: 65px;" align="center" onmouseover="this.className='MsgClick'" onmouseout="this.className=''" > <asp:LinkButton ID="LinkButton2" runat="server" Text='<%# Eval("UserName") %>' CommandName="show" class="InnerMenuFont"></asp:LinkButton> <asp:Label ID="Label1" runat="server" Text='<%# Eval("AdminId") %>' Visible="False"></asp:Label> <br /> </div> <hr style="width: 80%" /> </ItemTemplate> </asp:DataList>\[/code\]In the above code i need to access the current div in the id "DivContent"
 
Back
Top