本文介绍了将数据从asp.net传输到flex的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我必须以什么格式从asp.net导出数据到flex,以及如何?
In what format i have to export data from asp.net to flex and how?
推荐答案
private function LoadUserID():void
{
var url:String = "UserId.aspx";
var dataService:HTTPService = new HTTPService();
dataService.url = url;
dataService.method = "GET";
dataService.addEventListener(ResultEvent.RESULT, OnSuccess);
dataService.addEventListener(FaultEvent.FAULT,OnError);
dataService.send();
}
public function OnSuccess(evt:ResultEvent):void
{
_id = evt.result as Number;
_SelfID = _id;
}
public function OnError(evt:FaultEvent):void
{
if(_attempt<attempt_limit)>
{
_attempt++;
LoadUserID();
}
else
{
Alert.show("Fail : "+evt.fault.faultString,"Error Message");
}
}
这篇关于将数据从asp.net传输到flex的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!