Endiss
Endiss

Reputation: 699

PageMethod on mouse leave imagebutton asp.net?

Hello how can i add to imagebutton mouse leave event to run pagemethod i can't use javascript any idea?

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Zadanie_1_rysunki._Default" %>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 <html xmlns="http://www.w3.org/1999/xhtml">
 <head runat="server">
<title></title>
 </head>
 <body><center>
<form id="form1" runat="server">
<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/img/1.jpg" />
<div>

</div>
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
</asp:ScriptManager>
</form>
</center>
 </body>
 </html>

Upvotes: 1

Views: 170

Answers (1)

Chris Gessler
Chris Gessler

Reputation: 23123

Since you have 'EnablePageMethods' set to "true", I believe you can set the OnMouseLeave event to

"PageMethods.MyPageMethod(param1, param2, paramN);"

Upvotes: 1

Related Questions