如何绑定多个控件 [英] How to bind multiple controls
问题描述
嗨
在网页中,我有一个网格视图,一个详细视图和几个文本框.
我正在根据发票设计使用这些控件来打印发票
使用下拉列表,我已将数据值绑定到详细信息视图.
(客户detil,items,ItemParent这三个表具有此控件的值.
由fk链接的所有表.)
我在下拉列表中感到困惑,因为该列表中选择的发票号必须在所有控件中显示相关信息.
您能帮忙如何绑定多重控件吗?
谢谢
Hi
In a web page i have one grid view,one detail view and few textboxes.
These controls i am using based on my invoice design to print invoice
using Dropdown list i have bind the data value to the detail view.
(customer detil,items,ItemParent this three table have the value for this controls.
all the table linked by fk.)
i am confused here in dropdown list which invoice number selected that related information has to display in all the controls.
could you please help how to bind multipe control?
Thanks
推荐答案
为您的DropDownlist(AutoPostBack
和onselectedindexchanged
)设置以下属性
set below properties for your DropDownlist (AutoPostBack
andonselectedindexchanged
)
<asp:dropdownlist id="ddlCustomer" runat="server" autopostback="true" onselectedindexchanged="ddlCustomer_SelectedIndexChanged" xmlns:asp="#unknown"> </asp:dropdownlist>
onselectedindexchanged
事件处理程序如下所示
the onselectedindexchanged
event handler is as below
protected void ddlCustomer_SelectedIndexChanged(object sender, EventArgs e)
{
//bind your rest of the controls here, which you want to bind based on selected item of dropdownlist
}
我肯定这会对您有所帮助.
http://www.aspnettutorials.com/tutorials/controls/[^] [ ^ ]
最好的问候,
爱德华(Eduard)
Im sure this one will help you.
http://www.aspnettutorials.com/tutorials/controls/[^][^]
Best regards,
Eduard
请检查此链接
http://www.aspnettutorials.com/tutorials/controls/ [
hi check this link
http://www.aspnettutorials.com/tutorials/controls/[^]
hope it helps!
这篇关于如何绑定多个控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!