Foreground call background method in addition to using the button's Click event, you can also use JS call
First, the front page
Demand Click this button to trigger a background event to be able to invoke the stored procedure
<epoint:hyperlinkcolumn headertext= "Evaluation and calculation points" name= "SetUp" navigatetext= "<div class=" Small-icon Small-icon-setting ' ></div> ' isautowidth= ' true ' >
<itemstyle horizontalalign= "Center" width= "50px"/>
<itemtemplate >
<div class= ' Small-icon small-icon-setting ' onclick= ' showsetting (' <% #Convert. ToString (Eval ("RowGuid"))%> ' );" ></div>//Call JS
</ItemTemplate>
</epoint:HyperLinkColumn>
Second, JS method
Pagemethod definitions can refer to this link to view
1. Add the ScriptManager component to the page and set its Enablepagemethods property to True.
2. Write the page method also to call WebService, before the method add [WebMethod], call WebService and Pagemethods is actually expatiating, the principle is the same.
<asp:scriptmanager id= "ScriptManager1" runat= "Server" enablepagemethods= "true" >
</asp:ScriptManager>
Finally done!
About a control in the DataGrid that uses JS to invoke a background method event