title: Pass base64 image to javascript function when hover image
body: <p>net. Here is my question. 
  I gt one image inside my repeater.Please see the code below</p>
  
  <pre><code>                        &lt;asp:Repeater ID="rptCompanyProfile" runat="server" OnItemDataBound="rptCompanImage_ItemDataBound" DataMember="PICTURE_CONTENT"&gt;
                          &lt;ItemTemplate&gt;
  
                              &lt;td width="200px"&gt;
                                  &lt;asp:HiddenField ID="hfPictureContent" runat="server" Value='&lt;%#Eval("PICTURE_CONTENT") %&gt;' /&gt;
                          &lt;asp:ImageButton ID="ImageButton1" runat="server"
                             ImageUrl='&lt;%# string.Format("data:image/jpg;base64,{0}",Eval("PICTURE_CONTENT"))%&gt;' 
  
                              PostBackUrl='&lt;%# string.Format("~/Module/Client/WhoWeAreDetail.aspx?filterValue={0}&amp;&amp;filterType={1}",Eval("COMPANY_PROFILE_DETAIL"),Eval("COMPANY_PROFILE_ID") )%&gt;' 
                              /&gt;
  
  
                              &lt;/td&gt;
                              &lt;td width="10px"&gt;&amp;nbsp;&lt;/td&gt;
                          &lt;/ItemTemplate&gt;
  
                      &lt;/asp:Repeater&gt;
  </code></pre>
  
  <p>I need to change image when user move out the image.My image is store in database which is format base64 string. So i write the code as below</p>
  
  <pre><code>protected void rptCompanImage_ItemDataBound(object sender, RepeaterItemEventArgs e)
      {
          if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
          {
  
              ImageButton imageButton = (ImageButton)e.Item.FindControl("ImageButton1");
              HiddenField hfPictureContent = (HiddenField)e.Item.FindControl("hfPictureContent");
  
              System.Data.DataRowView rowView = e.Item.DataItem as System.Data.DataRowView;
  
  
              dlcComProfileDetail profileDetail = (dlcComProfileDetail)e.Item.DataItem;
              hfPictureContent .Value= profileDetail.PICTURE_CONTENT_HOVER;
  
              imageButton.Attributes.Add("onmouseout", @"onMouseOut(this,"  + hfPictureContent.Value  + ")");
  
            //  imageButton.Attributes.Add("onmouseout", @"this.src='data:image/jpg;base64,"+profileDetail.PICTURE_CONTENT_HOVER+"'");
  
  
  
  
          }
      }
  </code></pre>
  
  <p>My javascript function</p>
  
  <pre><code>**        function onMouseOut(item, value) {
  
          item.src = "data:image/png;base64," + value;
          item.setAttribute('src', src3);
  
  
      }
  
  
  
  
  &lt;/script&gt;**
  </code></pre>
  
  <p>But i keep get the error <strong>Uncaught SyntaxError: Unexpected token )</strong>  i am not able to pass my base64 string image to my javascript function. </p>
  
  <p>Please help . Thanks</p>