1

你好我怎么能添加到imagebutton鼠标离开事件来运行pagemethod我不能使用javascript任何想法?

<%@ 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>
4

1 回答 1

1

由于您将“EnablePageMethods”设置为“true”,我相信您可以将 OnMouseLeave 事件设置为

"PageMethods.MyPageMethod(param1, param2, paramN);"
于 2012-05-26T14:01:06.783 回答