Click here to Skip to main content
15,894,907 members
Please Sign up or sign in to vote.
1.00/5 (1 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.NET
<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
Updated 1-Feb-13 5:23am
v2
Comments
Jameel VM 1-Feb-13 7:29am    
you mean wrap a div on image when mouse hover?

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

JavaScript
$(document).ready(function()
{
 $(".input:image").hover(function(){

$('input:image').wrap('<div class="new" />');
});
});

hope this helps
 
Share this answer
 
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
Jameel VM 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
You can use json to fetch data ,chek link http://www.jquery4u.com/json/10-example-json-files/[^]
 
Share this answer
 
ASP.NET
<asp:imagebutton id="ImageButton1" runat="server" onmouseover="call(this)" value="<%#Eval("UNAME") %>" commandargument="<%#Eval("UNAME") %>" xmlns:asp="#unknown" />

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


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

C#
private void call(string id)
{}
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900