layui如何动态绑定asp.net后台中的数据
后台代码如下
[WebMethod]
public static string Get_work_order()
{
string sql = "select work_order from work_order where status = 1";
DataTable tb = DBSql.GetDataTable(sql, "1");
string json = Newtonsoft.Json.JsonConvert.SerializeObject(tb);
return json;
}
前台下拉框是这样的
```html
<form class="layui-form">
<div class="layui-form-item">
<label for="work_order" class="layui-form-label">工单编号</label>
<div class="layui-input-inline">
<select id="work_order" name="work_order" class="valid" lay-filter="work_orderFilter">
<option value="">工单编号</option>
</select>
</div>
</form>
```