Click here to Skip to main content
15,905,971 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In the following code I am unable to use mouseover to redirect to another page.

XML
<img src= '<%#DataBinder.Eval(Container.DataItem,"PicturePath") %>' onmouseover="mouseenter"
    style="height:200px;width:253px;"/>


C#
protected void mouseover(object sender, EventArgs e)
{
    Response.Redirect("ViewAndEditCart.aspx");
}
Posted

Use Javascript to do so

HTML
<img src="....." onmouseover="window.location.href='ViewAndEditCart.aspx';" style="...."/></img>
 
Share this answer
 
v2
Comments
S.Rajendran from Coimbatore 20-Feb-14 10:35am    
I am poor in Js. Can you guide me how to use the full code for this.
ASP
<img src="<%#DataBinder.Eval(Container.DataItem,"PicturePath") %>" onmouseover="document.location.href='ViewAndEditCart.aspx'">
    style="height:200px;width:253px;"/></img>

-KR
 
Share this answer
 
Comments
S.Rajendran from Coimbatore 20-Feb-14 11:00am    
Thanks.It works.
Krunal Rohit 20-Feb-14 11:01am    
Cheers.
-KR

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