[新增网络设备] 那个“窗口”如果是一个层(非服务器控件)的话,
那是不刷新页的,可用客户端脚本来使两个 DropDownList 的值相等:
VB.NET:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If (Not IsPostBack) Then
DropDownList1.Attributes("onchange") = "javascript: DropDownList2.selectedIndex = DropDownList1.selectedIndex;"
End If
End Sub
C#:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DropDownList1.Attributes["onchange"] = "javascript: DropDownList2.selectedIndex = DropDownList1.selectedIndex;";
}
}