now i have a problem with the dropdownlist selectedindexchanged event is fire only the 0th index no mather in what index i clicked on
so here comes the code
private void loadData()
{
DataTable DT = new DataTable();
OdbcCommand cmd;
OdbcConnection conn = new OdbcConnection(constr);
if (conn.State == ConnectionState.Closed)
{
conn.Open();
OdbcCommand sql = new OdbcCommand("SET CHARACTER SET `tis620`", conn);
sql.ExecuteNonQuery();
sql.Dispose();
}
cmd = new OdbcCommand("SELECT ifnull( filename, '' ) AS filename,name FROM `abt_meeting_topic` left join abt_meeting on abt_meeting.aid = abt_meeting_topic.id ", conn);
try
{
OdbcDataReader dReader = cmd.ExecuteReader();
{
DropDownList1.DataSource = dReader;
DropDownList1.DataTextField = "name";
DropDownList1.DataValueField = "filename";
DropDownList1.DataBind();
dReader.Close();
}
}
catch (Exception ex)
{
Response.Write(Utility.MessageBox("ไม่สามารถเรียกข้อมูลได้ กรุณาแจ้งผู้ดูแลระบบ (Error : " + ex + ")"));
}
if (conn.State == ConnectionState.Open)
{ conn.Close(); conn.Dispose(); }
}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
Response.Write("../meeting/" + DropDownList1.SelectedItem.Text);
}
every comment appreciated.