我有一个客户表 - >CustomerNumber
和CustomerName
列从另一个表获得一个数据DropownList用的AutoPostBack
我有一个Sales表 - >CustomerName
列
我有一个Label
(代表CUSTOMERNUMBER )和DropDownList
(代表客户名称)
我到DropDownList
销售表 - >客户名称与SqlDataSource
。
我想全自动(带的AutoPostBack)填充CUSTOMERNUMBER标签哪个客户名称中的DropDownList
例SQL选自:
选择A.CustomerNumber 从客户A,销售乙 其中B.CustomerName = DropDownList1。 SelectedItems.Value
我在这样想。
我该怎么做?
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
}
你是正确的方向。我看到你到达那里。 – Pradeep 2011-01-27 07:17:58