gpt4 book ai didi

asp.net - 数据绑定(bind) : 'System.Data.DataRowView' does not contain a property with the name 'Driver_Name'

转载 作者:行者123 更新时间:2023-12-02 04:42:02 25 4
gpt4 key购买 nike

 string[] Parameters = new string[3] { "@USER_ID", "@Company_ID", "@DRIVER_NAME" };
string[] DbTypes = new string[3] { "varchar", "int", "varchar" };
string[] ParameterTypes = new string[3] { "input", "input", "input" };
string[] values = new string[3] { (Session["UserID"].ToString()), ddlCompany.SelectedValue.ToString(), txt_DRIVER_NAME.Text.Trim() };
string[] Lengths = new string[3] { "50", "5", "20" };

DataUtility du = new DataUtility();
DataSet ds = du.returnDataSet(CommandType.StoredProcedure, "Driver_Zone_Wise", Parameters, DbTypes, ParameterTypes, values, Lengths);

lb_DriverList.DataTextField = "Driver_Name";
lb_DriverList.DataValueField = "DRIVER_ID";

lb_DriverList.DataSource = ds.Tables[0];
****lb_DriverList.DataBind();****

lb_DriverList.Items.Insert(0, new ListItem("Select Vehicle", "0"));

lb_DriverList.SelectedValue = "0";

}

最佳答案

提示您的查询结果中没有Driver_Name的错误。

检查您的查询和 ds.Tables[0],看看是否有 Driver_Name 列。

编辑-1

检查您的程序 Driver_Zone_Wise 是否确保您返回名称为 Driver_Name 的列。

关于asp.net - 数据绑定(bind) : 'System.Data.DataRowView' does not contain a property with the name 'Driver_Name' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20628126/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com