Click here to Skip to main content
15,905,504 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In what format i have to export data from asp.net to flex and how?
Posted

1 solution

you can export as string format. And you can use HTTPService for this.
Example:
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");
        	}
        }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900