ASPX Page
<body>
    <form id="form1" runat="server">
        <p>
            <asp:Label runat="server" ID="lblResponse" Text="I'm going to change..." />
            <axial:WFScriptButton runat="server" MethodName="Button" Text="Hello World" />
        </p>
        
        <p>
            <asp:TextBox runat="server" ID="txtName" />
            <axial:WFScriptButton runat="server" MethodName="Greet" Text="Greet" />
        </p>
        
        <p>
            <axial:WFScriptButton runat="server" MethodName="AddOne" Text="AddOne" />
        </p>
        
        <p>
            <axial:WFScriptButton runat="server" MethodName="Combine" Text="Combine" />
        </p>

        <axial:WFServerScript runat="server" />
    </form>
</body>


CodeBehind
public partial class WebServiceClient : System.Web.UI.Page
{
	public void Button()
	{
		new WebServiceProxy.WebService().JSCall("HelloWorld", ChangeTheLabel, AlertIt);
	}
	public void Greet()
	{
		new WebServiceProxy.WebService().JSCall("Hello", ChangeTheLabel, AlertIt, txtName.Text);
	}
	public void AddOne()
	{
		new WebServiceProxy.WebService().JSCall("AddOne", ChangeTheLabel, AlertIt, 3);
	}
	public void Combine()
	{
		new WebServiceProxy.WebService().JSCall("Combine", ChangeTheLabel, AlertIt, "a", "b");
	}

	public void ChangeTheLabel(object o)
	{
		lblResponse.Text = o.ToString();
	}
	public void AlertIt(object o)
	{
		Window.Alert(o.ToString());
	}
}

Last edited Dec 22, 2008 at 5:31 AM by thasmin, version 2

Comments

No comments yet.