Callback flowchart of anthem. net

Source: Internet
Author: User
The following uses the simplest example of the callback: button callback to sort out the order of functions executed in the callback process.
Code As follows: <% @ Page Language = " C # " Autoeventwireup = " True " Codefile = " Test. aspx. CS " Inherits = " Test "   %>
<% @ Register tagprefix = " Anthem " Assembly = " Anthem " Namespace = " Anthem "   %>

<!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 > Untitled page </ Title >
< Script Type = "Text/JavaScript" Language = "JavaScript" >
Function Anthem_precallback (){
Alert ('anthem _ precallback ');
If ( ! Confirm ('callback ? '))
Return   False ;
}

Function Btn1_precallback (){
Alert ('btn1 _ precallback ');
If ( ! Confirm ('callback ? '))
Return   False ;
}

Function Btn1_callbackcacelled (){
Alert ('btn1 _ callbackcacelled ');
}

Function Btn1_postcallback (){
Alert ('btn1 _ postcallback ');
}

Function Anthem_callbackcancelled (){
Alert ('anthem _ callbackcancelled ');
}

Function Anthem_error (result ){
Alert (result. Error );
}

Function Anthem_postcallback (){
Alert ('anthem _ postcallback ');
}
</ Script >
</ Head >
< Body >
< Form ID = "Form1" Runat = "Server" >
< Div >
< Anthem: button ID = "Btn1" Runat = "Server" Text = "Button 1" Onclick = "Btn1_onclick"
Precallbackfunction = "Btn1_precallback"
Callbackcancelledfunction = "Btn1_callbackcacelled"
Postcallbackfunction = "Btn1_postcallback"   />
</ Div >
</ Form >
</ Body >
</ Html >

Background code:Protected VoidBtn1_onclick (ObjectSender, eventargs E)
{
Anthem. Manager. addscriptforclientsideeval ("Alert ('script for eval ')");
Throw NewException ("Error Message");
}

The flowchart is as follows:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.