asp.netè¿ä¸ªä¸çº§èå¨æ¯å©ç¨.csæ件ä¸çäºä»¶æ¥å®ç°çï¼
æ¯å¦è¯´1级æ¯å为class1,2级æ¯å为class2,3级æ¯å为class3çdropdownlist
å½ç¶ï¼é¦å
è¦è®¾ç½®çº§èä¸æ表åå±æ§ï¼AutoPostBack = "true"æå¯ä»¥ï¼è¯¥ä¾ä¸class1åclass2è¿2个设置AutoPostBack = "true"
åå°æ·»å äºä»¶ï¼
private void class1_SelectedIndexChanged(object sender, System.EventArgs e)
{
//å®ä¹æéSQLè¯å¥
string sql="XXX";
//å¼å
¥æ°æ®åºæä½ç±»
Admin_ClassDb classdb=new Admin_ClassDb();
//äºä»¶class1éæ©ååå°è§¦åclass2ä¸çæ°æ®æ¹å class2.DataSource=classdb.GetTables(sql).DefaultView;
class2.DataTextField="XXX";
class2.DataValueField="XXX";
class2.DataBind();
}
åçåä¸äºä»¶å¤çæ¹æ³private void class2_SelectedIndexChanged(object sender, System.EventArgs e)æ¥æ¹åclass3çç»å®çæ°æ®
å¸æè½å¯¹å
å¼æ¨æ帮å©
æç®åçæ å·æ°ï¼ä¸ä¸ªdropdownlisté½æ¾å¨åä¸ä¸ªupdatepanelä¸ï¼å2个çauto...ç¶åç¨jsæ¥è¯»åéé¢çæ°æ®ï¼æåæ å·æ°çååï¼åæå·æ°ç就太ç®åäº ...
追é®èå¸ä¸è®©ç¨updatepanelã