You are overwriting the settings with BindTo. Remove that call and return a view with parameter.
this.Bind
and this.BindTo
are used to bind input parameters (query, form, request body) to a model, not to bind data to a view.
Get["fax"] = p =>
{
FaxModel model = new FaxModel();
var foundType = processes.Where(proc => proc.GetType().ToString().Contains("FaxServer"));
if(foundType.First() != null)
{
bool enabled = Boolean.Parse(WorkflowSettings.GetValue(foundType.First().GetProcessName(), "Enabled"));
bool deleteAfterSuccess = Boolean.Parse(WorkflowSettings.GetValue(foundType.First().GetProcessName(), "DeleteWorkflowItemsAfterSuccess"));
model.EnableFaxes = enabled;
model.DeleteFaxes = deleteAfterSuccess;
}
return View["fax", model];
};
Or, as far as your model class follows the convention, you can just do:
return View[model];
See the view engine examples.
Also, your html should use the model properties like this:
<input name="EnableFaxes" value=@Model.EnableFaxes type="checkbox">Automated Faxing Enabled