---
title: 500 Error on Submit with DropDownCheckBoxList
slug: 500-error-on-submit-with-dropdowncheckboxlist
docTags: 
createdAt: 2026-03-19T19:27:14.671Z
---

### Summary

Submitting a form containing a DropDownCheckBoxList can result in a **500 Internal Server Error** due to an invalid binding configuration. The issue manifests as an XPath evaluation failure during model binding.

## Symptoms

- **HTTP Response:** 500 Internal Server Error&#x20;
- **Endpoint:** POST /webapi/Job/current/step/0
- **UI Behaviour:**
  &#x20;Error occurs when submitting the form (not during initial load)&#x20;

## Error Details

```xml
<Error>
    <Message>Exception has been thrown by the target of an invocation.</Message>
    <Details>
        System.Xml.XPath.XPathException: Expression must evaluate to a node-set.
    </Details>
</Error>
```

## Affected Control Configuration

```xml
<DropDownCheckBoxList
    ID="licenseType"
    ActivateBind="licenseType"
    Label="License Type"
    DataValueField="LicenseTypeId"
    DataTextField="Name"
    BindingStyle="ValueList">
</DropDownCheckBoxList>
```

## Root Cause

The issue is caused by an incorrect BindingStyle configuration.

- DropDownCheckBoxList returns **multiple selected values**&#x20;
- Example output: 1,2
- BindingStyle="ValueList" does **not correctly handle this format during submit**&#x20;
- During model binding, the value is processed by the XML layer (XmlValue.Set), which attempts to evaluate it as part of an XPath expression&#x20;
- This results in: XPathException: Expression must evaluate to a node-set

## Resolution

Update the control to use EnumList:

```xml
<DropDownCheckBoxList
    ID="licenseType"
    ActivateBind="licenseType"
    Label="License Type"
    DataValueField="LicenseTypeId"
    DataTextField="Name"
    BindingStyle="EnumList">
</DropDownCheckBoxList>
```

## Outcome

- Multi-select values are correctly handled as a comma-separated list (e.g. 1,2)&#x20;
- Model binding completes successfully&#x20;
- No XPath evaluation error&#x20;
- Form submission succeeds&#x20;

## Key Takeaway

For DropDownCheckBoxList controls that return multiple values, always use:

:::BlockQuote
BindingStyle="EnumList"
:::

Using ValueList in this scenario can cause binding failures and server-side XPath exceptions during form submission.
