<asp:DataList ID="dlqty" Width="100%" runat="server" RepeatColumns="1" RepeatDirection="Vertical"> <ItemTemplate> <tr> <td style="padding-left:5px;padding-right:5px;"> <table width="100%" border="0" cellpadding="0" cellspacing="0" class="bdr"> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="40" class="abtext" style="border-bottom:#dddddd solid 1px; padding-left:10px"> <asp:Label ID="lblproduct" runat="server" CssClass="abtext"><%#Eval("Product") %></asp:Label> </td> </tr> </table></td> </tr> <tr> <td style="padding-top:1px;"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="tabo"> <tr> <td width="22%" height="30" align="center" valign="top" style="padding-top:5px;"><img src="images/noimage.png" width="105" height="105" /></td> <td width="28%"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="20" class="gntext2">Description</td> </tr> <tr> <td height="77"><asp:Label ID="lbldescription" runat="server" CssClass="smtext"><%#Eval("description") %></asp:Label></td> </tr> </table></td> <td width="1%" align="center"><img src="images/dev1.png" width="1" height="92" /></td> <td width="25%" style="padding-left:5px;"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="20"> </td> </tr> <tr> <td height="20" class="smtext2" style="padding-left:10px;">MRP: $ </td> </tr> <tr> <td height="20" class="gntext2" style="padding-left:10px;">Qnty: <asp:Label ID="lblqty" runat="server"><%#Eval("quantity") %></asp:Label> </td> </tr> <tr> <td height="20" class="btext" style="padding-left:10px;"> </td> </tr> </table></td> <td width="8%"> </td> <td width="16%"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="35" align="center"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image5','','images/buy_ro.png',1)"> <asp:TextBox runat="server" ID="txtno" CssClass="txtbox"></asp:TextBox> </a></td> </tr> <tr> <td height="20" align="center" class="bnutext">Qnty Required </td> </tr> </table></td> </tr> </table></td> </tr> </table> </td> </tr> <tr> <td height="30px"> </td> </ItemTemplate> <FooterTemplate> <asp:ImageButton ID="btnreg" runat="server" ImageUrl="~/images/sub.PNG" CommandName="rsm"/> </FooterTemplate> </asp:DataList>
FindControl
foreach (DataListItem item in myDataList.Items) { TextBox myTextBox = (TextBox)item.FindControl("myTextBox"); string text = myTextBox.text; // Do what you need to with this string value now }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)