ASPX页面
<div>
                                <asp:UpdatePanel id="UpdatePanel2" runat="server">
                                    <ContentTemplate>
                                        <asp:DropDownList id="DropDownList1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DDL1_SelectedIndexChange" Width="100px"></asp:DropDownList><br /><br />
                                        <asp:DropDownList id="DropDownList2" runat="server" Width="100px"></asp:DropDownList>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </div>
c#页面
protected void Page_Load(object sender, EventArgs e)
    {
    this.username.Text = Convert.ToString(Session["username"]);
    this.gongsiname.Text = Convert.ToString(Session["gongsiname"]);
    string type2 = Request.Params["DropDownList2.SelectedValue"];
    if (!IsPostBack)
        {
        BindDrop();
        }
    }
    private void BindDrop()
    {
    //将数据捆绑到下拉列表中
    SqlConnection conn = comy_user_user_fabu.Getconn();
    string sql = "select * from Province";
    SqlDataAdapter myCommand = new SqlDataAdapter(sql, conn);
    DataSet myds = new DataSet();
    myCommand.Fill(myds, "Authors");
    DropDownList1.DataSource = myds.Tables["Authors"].DefaultView;
    DropDownList1.DataTextField = "Province_Name";  //设置列表显示的字段
    DropDownList1.DataValueField = "ProvinceType"; //设置列表提交后获得的字段
    DropDownList1.DataBind();
    DropDownList1.Items.Insert(0, new ListItem("请选择类别", ""));//第一项中加入内容,重点是绑定后添加
    DropDownList2.Items.Insert(0, new ListItem("请选择细分类别", ""));//第一项中加入内容,重点是绑定后添加
    }
    protected void DDL1_SelectedIndexChange(object sender, EventArgs e)
    {
    SqlConnection conn = comy_user_user_fabu.Getconn();
    //注:在SQL语句中的函数 substring(dqdm,1,2) 是从数字1开始算起;而在C#中 Substring(0, 2) 是从0开始算起;
    string sql2 = "select * from City where type='" + DropDownList1.SelectedIndex + "'";
    //string sql2 = "select * from City where type='"+ DropDownList1.DataValueField.ToString()+"'";
    //string sql2 = "select * from City where str.substring(4,str.length)='" + DropDownList1.SelectedValue.Trim().Substring(0, 2) + "'";
    SqlDataAdapter myCommand2 = new SqlDataAdapter(sql2, conn);
    DataSet myds2 = new DataSet();
    myCommand2.Fill(myds2, "Authors");
    DropDownList2.DataSource = myds2.Tables["Authors"].DefaultView;
    DropDownList2.DataTextField = "City_Name";  //设置列表显示的字段
    DropDownList2.DataValueField = "type"; //设置列表提交后获得的字段
    DropDownList2.DataBind();
    }
    protected void Bt_tijiao_Click(object sender, EventArgs e)
    {
        SqlConnection conn = comy_user_user_fabu.Getconn();
        SqlCommand mycom = new SqlCommand();
        mycom.Connection = conn;
         mycom.Parameters.AddWithValue("compy_id",this.username.Text);
         mycom.Parameters.AddWithValue("gongsiname",this.gongsiname.Text);
         mycom.Parameters.AddWithValue("type1", this.DropDownList1.SelectedItem.Text);
         mycom.Parameters.AddWithValue("type2", this.DropDownList2.SelectedValue.ToString());
         mycom.Parameters.AddWithValue("title", this.title.Text);
        mycom.Parameters.AddWithValue("content",this.content.Value);
        DateTime dt=DateTime.Now;
        mycom.Parameters.AddWithValue("dt", dt);
        mycom.CommandText = "insert into Company(Compy_id,Compy_name,Company_type,Company_Info_title,Company_type2,Company_Info_content,Company_Info_SetTime)values(@compy_id,@gongsiname,@type1,@title,@type2,@content,@dt)"; 
        conn.Open();
        mycom.ExecuteNonQuery();
        Response.Redirect("~/index.aspx");
    }
数据库表
Province.tb
Province_ID
Province_Name
ProvinceTypeCity.tb
City_ID
City_Name
type从第二个dropdownlist中取到是他们的type标识,是怎么回事。求助,谢谢