Can anybody help me how can I call function declare in asp.net file from flash
using flash remoting.
here is my c# file login.cs
using System;
using FlashGateway.IO;
using System.Data ;
namespace rflremoting
{
/// <summary>
/// Summary description for login.
/// </summary>
public class login
{
protected FlashGateway.Flash Flash;
public void echo(string s)
{
return s;
}
}
}
and here is my action script file
import mx.remoting.*;
if (inited == null)
{
inited = true;
NetServices.setDefaultGatewayUrl("http://localhost/rflremoting/gateway.aspx");
serviceConnection = NetServices.createGatewayConnection();
myservice = serviceConnection.getService("rflremoting.login", this);
}
//function executes when the user clicks the button
btn_test.clickHandler=function()
{
myservice.echo(_root.inputtxt.text);
}
function echo_result(result)
{
_root.outputtxt.text=result;
}
function echo_status(result)
{
_root.outputtxt.text=error.description;
}
Sankalan - 19 Oct 2006 22:36 GMT
You can go through this article:
http://aspalliance.com/942_Working_with_Flash_Remoting_Using_NET
This article will give you a detail idea about Flash remoting with .NET, and
also has some sample project.
Thanks
Sankalan
(www.mindfiresolutions.com)