第一个Atlas例子,下拉列表的联动。有错误“Unknow error".已经检查N遍了~~
我估计是我的Atlas本身有错误:前台代码:
<form id="form1" runat="server">
<atlas:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="True">
</atlas:ScriptManager>
<br />
<atlas:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:DropDownList ID="DropDownList2" runat="server">
</asp:DropDownList>
</ContentTemplate>
<Triggers>
<atlas:ControlEventTrigger ControlID="DropDownList1" EventName="SelectedIndexChanged" />
</Triggers>
</atlas:UpdatePanel>
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"
OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
<asp:ListItem>aaa</asp:ListItem>
<asp:ListItem>bbb</asp:ListItem>
<asp:ListItem>ccc</asp:ListItem>
</asp:DropDownList>
</form>
后台代码:
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
string name = DropDownList1.SelectedValue.ToString();
string conn = "provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("./data/english.mdb");
OleDbConnection myconnection = new OleDbConnection(conn);
string cmd="select * from Users";
OleDbCommand mycommand = new OleDbCommand("cmd", myconnection);
OleDbDataAdapter da = new OleDbDataAdapter(mycommand);
DataSet ds = new DataSet();
da.Fill(ds, "Users");
DropDownList2.DataSource = ds.Tables["Users"];
DropDownList2.DataTextField = "username";
DropDownList2.DataBind();
} --------------------编程问答-------------------- 做了好几个例子都是相同的错误每当刷新时提示:“Unknow error".
不知大家有没有遇到过~~~` --------------------编程问答-------------------- 我也想知道,怎么没有人回复呢..
期待中.....
补充:.NET技术 , ASP.NET