asp.net - how to assign unique id to a input text field in listview -
i need assign unique id input text field in listview. here code...
<asp:listview id="viewproductbycategorylistview" runat="server" groupitemcount="4" groupplaceholderid="groupplaceholder1" itemplaceholderid="itemplaceholder1" clientidmode="predictable" clientidrowsuffix="id"> <layouttemplate> <table> <asp:placeholder runat="server" id="groupplaceholder1"></asp:placeholder> </table> </layouttemplate> <grouptemplate> <tr> <asp:placeholder runat="server" id="itemplaceholder1"></asp:placeholder> </tr> </grouptemplate> <itemtemplate> <td> <table cellpadding="2" cellspacing="0" style="width: 200px; height: 100px;"> <tr> <td> <!--image , tooltip--> <div class="uiv2-list-box-img-block"> <a href="../viewproductdetails.aspx?productid='<%# eval("id") %>'" title='<%# eval("product_description") %>'> <%-- <img title="fresho onion - medium 1 kg approx. 10 12 nos" alt="fresho onion - medium 1 kg approx. 10 12 nos" src="~/picture.ashx?pic='<%# eval("productimage") %>' " />--%> <asp:image runat="server" imageurl='<%# getimage(eval("productimage")) %>' height="150px" width="150px" /> </a> </div> <div> <span class="name" style="display: inline; text-overflow: ellipsis; overflow: hidden;"> <%# eval("productname") %></span> </div> <div class="uiv2-list-box-drop-rate-block"> <!--to display unit price--> <div class="listbox_rate_count"> <div class="uiv2-rate-count-avial"> <span class="webrupee">rs.</span> <span> <%# eval("unitprice") %> </span> </div> </div> <div class="uiv2-list-rate-block"> <div class="uiv2-add-to-basket"> <!--to display quantity--> <div class="uiv2-rate-count-btn"> <span class="uiv2-qty-label">qty</span> **<input value="1" type="text" maxlength="2" id="productidtextbox"/>** </div> <asp:button onclientclick='<%# string.format("return updatecart({0},this)", eval("id")) %>' runat="server" text="add" /> </div> </div> </div> </td> <td style="border-left: 1px solid black; padding: 5px"> </td> </tr> <tr> <td> <hr runat="server" /> </td> </tr> </table> </td> </itemtemplate> </asp:listview>
i have mark input field ** in above code want assign unique id. can 1 tell me what's wrong here.
after doing lot of hit , trial... found solution .... cannot use pure html control unique id feature in listview or asp.net server side control.
Comments
Post a Comment