关于使用DropDownList控件的一个问题!
procedure TWebForm1.DropCombobox1_SelectedIndexChanged(sender: System.Object;
e: System.EventArgs);
begin
Self.Response.Write('<script language="javascript">alert("OK");</script>');
end;
为什么执行时选择DropCombobox1的值变化时,没有弹出OK提示框?
问题点数:30、回复次数:2Top
1 楼yundou()回复于 2005-10-24 11:54:48 得分 0
procedure ProductForm.XZFL_Combobox_SelectedIndexChanged(sender: System.Object;
e: System.EventArgs);
var
ds:DataSet;
dt:DataTable;
SqlDA:OleDbDataAdapter;
begin
sqlda:=OleDbDataAdapter.Create('Select P_name from Product where P_xilie='+''''+'123系列'+'''','Provider="Microsoft.Jet.OLEDB.4.0";Data Source="'+Server.MapPath('database\data.mdb')+'";Persist Security Info=True;Password=');
ds:=DataSet.Create;
sqlDa.Fill(ds,'Product');
dt:=ds.Tables['product'];
CPMC_Combobox.DataSource:=dt.DefaultView;
CPMC_Combobox.DataTextField:='p_name';
CPMC_Combobox.DataBind;
end;
这个过程就是在选DropDownList1中的值时,根据DropDownList1中的值,查询出的记录,让DropDownList2来显示。
现在问题是,不管怎么选DropDownList1的值,好像根本就没有发生这个事件.Top
2 楼THE_ROCK(熨斗)回复于 2005-11-07 20:14:07 得分 30
帮你顶!Top




