代码改成
Dim sl As String = "100"If e.Form.DropDownBox.value > "" Then e.Form.Controls("数量").value = val(sl)Else e.Form.Controls("数量").value = 0 e.Form.Controls("数量").value = NothingEnd If