Ok, I am a ASP.Net noob so bear with me. I have a DataGrid in which I have a column where I have an image of which I get the path to from my database. Everything works fine to this point. Now, I want to add a JavaScript that I found to have a DHTML tooltip come up when you mouse over the image. The javascript takes an array ("Title", "Text") to create the tooltip. Now, when I am binding the DataGrid, I need to have a line just before the image that iswhere the index of Text[] changes for each row in my grid. Then bind the imageCode:<script language="javascript">Text[0]="MyTitle","MyText"</script>
VB Code:
<asp:datagrid id="dgReviews" runat="server"> <Columns> <asp:TemplateColumn HeaderText="Game"> <ItemTemplate> <asp:HyperLink ID="lnkGameTitle" Runat="server" NavigateUrl=<%# "Reviews.aspx?GameID=" & trim(Container.DataItem("GameID")) & "&ReviewerID=" & trim(Container.DataItem("ReviewerID"))%>></asp:HyperLink> </ItemTemplate> </asp:TemplateColumn> <ItemTemplate> <asp:Image id="imgESRB" onMouseOver="myjscriptfunction(Text[0])" runat="server" ImageUrl=<%# Container.DataItem("ESRBThumb")%>></asp:Image> </ItemTemplate> </asp:TemplateColumn> </Columns> </asp:datagrid>




I drink to make other people more interesting!
Reply With Quote