View Single Post
  #1 (permalink)  
Old December 18th, 2007, 06:16 AM
Manoj Bisht Manoj Bisht is offline
Authorized User
 
Join Date: Apr 2007
Location: Delhi, Delhi, India.
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default Passing databound value(DataBider.Eval) to a javas

Hello Friends,

I want to send the ImageUrl fetching from the database to the Javascript function

<img onmouseover="javascript:doTooltip(event,0,'<%# DataBinder.Eval(Container.DataItem,"Image") %>')" onmouseout="hideTip()" id="myImage1" name="myImage1" src='<%# DataBinder.Eval(Container.DataItem,"Image") %>' Runat="server" Height="125" Width="125" />


But this piece of code throwing an Parser Error given below

The server tag is not well formed.



But if i give the path of a particular image then it works great....as given below


<img onmouseover="javascript:doTooltip(event,0,'Images/img1.jpg')" onmouseout="hideTip()" id="myImage1" name="myImage1" src='<%# DataBinder.Eval(Container.DataItem,"Image") %>' Runat="server" Height="125" Width="125" />