title: how to count of datalist item (which is an image)
body: <p>i want to count items image (ImageUploaded) in Datalist in javascript how can i do that.</p>
  
  <pre><code> &lt;asp:DataList ID="DataListUploadedPhotos" ClientIDMode="Static" runat="server" RepeatDirection="Horizontal" RepeatColumns="3" CellPadding="10" CellSpacing="10" OnItemDataBound="DataListUploadedPhotos_ItemDataBound" ItemStyle-VerticalAlign="Top"&gt;
  &lt;ItemTemplate&gt;
  &lt;table border="0" cellpadding="2" cellspacing="0" align="left" width="100%"&gt;
  &lt;tr&gt; &lt;td align="left" style="width:200px; height:30px"&gt;
      &lt;b&gt;
  &lt;asp:Label ID="LabelImageTitle" runat="server" Text='&lt;%#Eval("title")%&gt;' Height="10px"&gt;&lt;/asp:Label&gt;
   &lt;/b&gt; &lt;/td&gt; &lt;td align="right"&gt;  &lt;/td&gt;  &lt;/tr&gt; &lt;tr&gt;  &lt;td align="center" colspan="2" style="background-color: #eeeeee; width: 260px; height: 260px" valign="middle"&gt;
   &lt;asp:Image ID="ImageUploaded" runat="server" ImageUrl='&lt;%#"../upload/photos/LargeThumbs/"+Eval("fileName")%&gt;'
  AlternateText='&lt;%#Eval("title")%&gt;' ClientIDMode="Static"  Style="border: 5px solid #eeeeee;" onclick='&lt;%# "return ImageSelected(this.id, " + Eval("photoId") +",\"ContentPlaceHolder1_txtIds\");"%&gt;' /&gt;&lt;/td&gt;
                                                                  &lt;/tr&gt;
                                                                  &lt;tr&gt;
                                                                      &lt;td&gt;
    &lt;a href='&lt;%#"../upload/photos/PopUpThumbs/"+Eval("fileName")%&gt;'&gt;
   &lt;asp:ImageButton ID="ImageButtonResultClose" runat="server" ImageUrl="~/images/enlarge.png" /&gt; &lt;/a&gt; 
   &lt;asp:Label ID="LabelPhotoid" runat="server"  Text='&lt;%#Eval("photoId")%&gt;'&gt;&lt;/asp:Label&gt;
                                                                          &lt;/td&gt;
                                                                          &lt;td&gt;
   &lt;asp:ImageButton ID="details" runat="server" ImageUrl="~/images/details.png" OnClick="details_Click"
                                                                              CommandArgument='&lt;%#Eval("photoId")%&gt;'/&gt;
  &lt;/td&gt;&lt;/tr&gt;
                                                                  &lt;tr&gt;
                                                                      &lt;td&gt;
                                                                          &amp;nbsp;
                                                                      &lt;/td&gt;
                                                                  &lt;/tr&gt;
                                                              &lt;/table&gt;
                                                          &lt;/ItemTemplate&gt;
                                                      &lt;/asp:DataList&gt;
  </code></pre>