Click here to Skip to main content
13,191,638 members (65,503 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
I want to Bind Data On Mouse Over of My DataList ImageButton
I have place ImgaeButton having CommandArument So can i bind Some Div on mouse Over
<asp:ImageButton ID="ImageButton1" runat="server" onmouseover="call(this)"  CommandArgument ='<%#Eval("UNAME") %>'/>


i want to catch commandArgument value from javascript or codebehind on mouseover
Posted 1-Feb-13 1:24am
Updated 1-Feb-13 5:23am
v2
Comments
JemiM 1-Feb-13 7:29am
   
you mean wrap a div on image when mouse hover?
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Please use jQuery like below.These create a parent div for image when mouse hover.Please make sure that you must implement jQuery plugin.

$(document).ready(function()
{
 $(".input:image").hover(function(){
 
$('input:image').wrap('<div class="new" />');
});
});

hope this helps
  Permalink  
v2
Comments
Member-515487 1-Feb-13 7:39am
   
how can i bind data for that particular ImgeButton means i want my EVAL(id)
Member-515487 1-Feb-13 7:41am
   
I want to fetch Value for that perticalar img button
JemiM 1-Feb-13 7:46am
   
did you display the images in datalist?
Member-515487 1-Feb-13 11:57am
   
yes imgbutton is in datalist on mouse over i want to grab CommandArgment value that can make me help to bind other info
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

You can use json to fetch data ,chek link http://www.jquery4u.com/json/10-example-json-files/[^]
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

<asp:imagebutton id="ImageButton1" runat="server" onmouseover="call(this)" value="<%#Eval("UNAME") %>" commandargument="<%#Eval("UNAME") %>" xmlns:asp="#unknown" />

function call(i) {
            alert(i.value);
           var a=i.value;
        }


NOw just i have to Call __doPostBack('call','a'); //is it Right????

private void call(string id)
{}
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy |
Web04 | 2.8.171017.2 | Last Updated 1 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100