更新时间:2023-10-07 09:56:04
您的下拉列表必须在GridViewTemplate中,因此只需编写一个函数即可在当前行中找到控件,这样您就可以读取该dplist的值.
Hi,
Your dropdown list must be in GridViewTemplate, so just write a function where you find the control from current row and so you could be able to read the value of that dplist.
将下拉列表放入其中网格视图并在选定的索引更改事件中随意编写代码
< pre>
< asp:DropDownList ID ="ddlist1" runat ="server" OnSelectedIndexChanged ="ddlist1_SelectedIndexChanged"
AutoPostBack ="true"/>
受保护的void ddlist1_SelectedIndexChanged(object sender,EventArgs e)
{
您的代码
}
</pre>
place dropdown list inside grid view and write the code whatever u want in selected index changed event
<pre>
<asp:DropDownList ID="ddlist1" runat="server" OnSelectedIndexChanged="ddlist1_SelectedIndexChanged"
AutoPostBack="true" />
protected void ddlist1_SelectedIndexChanged(object sender, EventArgs e)
{
u r code
}
</pre>
解决方案1
我需要代码Plz
Solution 1
i need The code Plz