Passing parameter from asp.net page for agile application

I have an asp.net page where I get the user_id from who is logged in. Now I need to pass this user_id to flex app which is executed in asp.net page as .swf. How can I get this user_id in a variable in my flex app. Or what is the best way to get user_id in flex. Thanks to

+2


a source to share


2 answers


You make another asp.net page and on that page you get this user id and write to the page. from flex app remove this asp.net page with HTTPService and get response. in this answer u get this user id ...



var httpservice:HTTPService=new HTTPService();
     httpservice.url="http://xyz.com/getuser.aspx;
     httpservice.useProxy=false;
     httpservice.method="Post";
     httpservice.resultFormat="text";
     httpservice.addEventListener(FaultEvent.FAULT,GettingException);
     httpservice.addEventListener(ResultEvent.RESULT,Result);
     httpservice.send();


private function GettingException(e:FaultEvent){

 Alert.show(e.fault.message, "Could not load page");

}
 private function Result(e:ResultEvent){

 var Result:String = e.result.toString();
 Alert.show(Result);

}

      

+1


a source


If you are linking to an ASP.Net page that contains swf, you can obfuscate the user_id and pass it to the querystring, or use a guideline that maps to the user_id. Flex can read a value from a query string. See this article.

Or you can insert the user_id value into flashvars (the ASP.Net page must have access) and read it from there.



userID = Application.application.parameters.user_id;

      

+1


a source







All Articles