Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

Page.Args Property

A convenience, case-insensitive table that may be used to e.g. pass data into SpEL expressions"/>.

[Visual Basic]
Public ReadOnly Property Args() As IDictionary
   Public Get
   End Get
End Property
[C#]
public IDictionary Args { public get; }

Remarks

By default, e.g. SetResult passes the control instance into an expression. Using Args is an easy way to pass additional parameters into the expression This example shows how to pass an arbitrary value 'age' into a result expression.

// config:

<property Name="Results">
  <dictionary>
          <entry key="ok_clicked" value="redirect:~/ShowResult.aspx?age=%{Args['age']}" />
  </dictionary>
</property>

// code:

void OnOkClicked(object sender, EventArgs e)
{
  Args["result"] = txtAge.Text;
  SetResult("ok_clicked");
}

See Also

Page Class | Spring.Web.UI Namespace