这是一个ASPX页我提交后台保存后,而前面的LISTBOX的值在数据库变动了,想不刷新客户端而直接把LISTBOX的值更新,麻烦大家指点一下?
这是我在后台的邦定
private void BindDirData()
{
SilverSaleBroker broker = new SilverSaleBroker();
DataSet ds = broker.GetByType((Employee.branch_id).ToString(), Int32.Parse(this.AccountCode));
DataView dv = ds.Tables[0].DefaultView;
ListBox1.DataSource = dv;
ListBox1.DataTextField = "CheckCode";
ListBox1.DataValueField = "CheckCode";
ListBox1.DataBind(); if (dv.Count != 0){
this.ListBox1.SelectedIndex = 0;
}
}前台
<asp:ListBox ID="ListBox1" runat="server" Width="292px" Rows="5" Height="80px"></asp:ListBox>
这是我在后台的邦定
private void BindDirData()
{
SilverSaleBroker broker = new SilverSaleBroker();
DataSet ds = broker.GetByType((Employee.branch_id).ToString(), Int32.Parse(this.AccountCode));
DataView dv = ds.Tables[0].DefaultView;
ListBox1.DataSource = dv;
ListBox1.DataTextField = "CheckCode";
ListBox1.DataValueField = "CheckCode";
ListBox1.DataBind(); if (dv.Count != 0){
this.ListBox1.SelectedIndex = 0;
}
}前台
<asp:ListBox ID="ListBox1" runat="server" Width="292px" Rows="5" Height="80px"></asp:ListBox>
dyw31415926listBox.Reflesh()
加在那的?