c# datalist怎么取值
<asp:DataListID="DataList4"runat="server"BorderStyle="Double"DataSourceID="SqlDataSou...
<asp:DataList ID="DataList4" runat="server" BorderStyle="Double" DataSourceID="SqlDataSource4" style="z-index: 1; left: 266px; top: 116px; position: absolute; height: 58px; width: 100px; margin-top: 1px">
<ItemTemplate>
厂商<br />
<asp:Label ID="sup_nameLabel" runat="server" Text='<%# Eval("sup_name") %>' />
<br />
</ItemTemplate>
</asp:DataList>
想要把第一行值 取出来给 cs
string kh, kssj, jssj,cs;
kh = TextBox1.Text;
kssj = TextBox2.Text;
jssj = TextBox3.Text;
cs = DataList4.text;
SqlDataSource1.SelectCommand = "select item_name from view_item_info where item_barcode='" + cs + "'"; 展开
<ItemTemplate>
厂商<br />
<asp:Label ID="sup_nameLabel" runat="server" Text='<%# Eval("sup_name") %>' />
<br />
</ItemTemplate>
</asp:DataList>
想要把第一行值 取出来给 cs
string kh, kssj, jssj,cs;
kh = TextBox1.Text;
kssj = TextBox2.Text;
jssj = TextBox3.Text;
cs = DataList4.text;
SqlDataSource1.SelectCommand = "select item_name from view_item_info where item_barcode='" + cs + "'"; 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询