Try this,
<asp:DropDownList AutoPostBack="true" ID="dd1" runat="server" OnSelectedIndexChanged="dd_select_changed">
</asp:DropDownList>
<asp:DropDownList ID="dd2" runat="server">
</asp:DropDownList>
<asp:Label ID="label1" runat="server"></asp:Label>
<asp:Label ID="label2" runat="server"></asp:Label>
<asp:Label ID="label3" runat="server"></asp:Label>
protected void Page_Load(object sender, EventArgs e)
{
connection();
string sql = "select * from Customer ";
cmd = new SqlCommand(sql, conn);
da = new SqlDataAdapter(cmd);
da.Fill(ds);
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
dd1.DataSource = ds.Tables[0];
dd1.DataBind();
dd1.DataTextField = "CustomerName";
dd1.DataValueField = "CustomerId";
Label1.Text = ds.Tables[0].Rows[i]["CustomerAddress"].ToString();
}
}
public void connection()
{
string sqlcon = System.Configuration.ConfigurationManager.AppSettings["conn"];
conn=new SqlConnection(sqlcon);
conn.Open();
}
protected void dd_select_changed(object sender, EventArgs e)
{
connection();
string sql = "select * from Customer where CustomerId='"+ Convert.ToInt32(dd1.SelectedItem.Value.ToString()) + "' ";
cmd = new SqlCommand(sql, conn);
da = new SqlDataAdapter(cmd);
da.Fill(ds);
Label1.Text = ds.Tables[0].Rows[0]["CustomerAddress"].ToString();
Label2.Text = ds.Tables[0].Rows[0]["CustomerMobile"].ToString();
Label3.Text = ds.Tables[0].Rows[0]["CustomerCity"].ToString();
}