sp; ///
34 private static readonly string[ ] localhost = new string[ ] { "localhost" , "www.devedu.com" };
35
36 private string localImageSrc = string.Empty;
37
38 private void Page_Load( object obj , EventArgs args )
39 {
40 if ( !Page.IsPostBack )
41 {
42 ClientScriptManager csm = Page.ClientScript;
43
44 string scripCallServerDownLoad = csm.GetCallbackEventReference( this , "args" , "__ReceiveServerData" , "context" );
45 string callbackScriptDwonLoad = "function __CallServerDownLoad(args , context) {" + scripCallServerDownLoad + "; }";
46 if ( !csm.IsClientScriptBlockRegistered( "__CallServerDownLoad" ) )
47 {
48 csm.RegisterClientScriptBlock( this.GetType( ) , "__CallServerDownLoad" , callbackScriptDwonLoad , true );
49 }
50 }
51 }
52
53 #region ICallbackEventHandler 成员
54
55 ///
56 /// 返回数据
57 ///
58 /// 如果处理过程中出现错误,则仍然返回远程路径
59 /// 服务器端处理后的本地图片路径
60 public string GetCallbackResult( )
61 {
62 return localImageSrc;
63
64 }
65
66 ///
67 /// 处理回调事件
68 ///
69 ///&