Apr 18, 2012, 1:02 PM
[CLOSED] [Razor] Parameter passing from DirectEvents
Hi
I've created a combobox with a directEvent attached and defined the method in the controller which is called when the user selected a value.
What is the best way to either:
1) Pass the selected value into the Controller
2) Access the selected value directly from Controller
cshtml
I've created a combobox with a directEvent attached and defined the method in the controller which is called when the user selected a value.
What is the best way to either:
1) Pass the selected value into the Controller
2) Access the selected value directly from Controller
cshtml
@(
Html.X().ComboBox()
.ID("cbDirectEvent")
.Text("ComboBox1")
.Store(store => store.Add(
...
))
.Model(model => model.Add(Html.X().Model()
.Fields(fields =>
{
fields.Add(Html.X().ModelField().Name("Value"));
})
))
))
.DirectEvents(directEvents =>
{
directEvents.Select.Url = "/Controller/ValueSelect";
})
.DisplayField("Value")
.ValueField("Value")
)
Controller Code
public ActionResult ComboBoxSelect()
{
// Use selected value from combobox
}
Last edited by Daniil; Apr 20, 2012 at 6:55 PM.
Reason: [CLOSED]