i want to populate data to dropdown 2 after selecting options from dropdown1 plz any one help me ......... plz send code in asp.net ..... plz help

You can do this by a postback:

<!-- on your first dropdownlist have an onselected code -->
<asp:DropDownList id="ColorList" AutoPostBack="True" OnSelectedIndexChanged="ddlColorListChange" runat="server">

<!-- now in the script at the top of the page create a sub -->
<script language="vb" runat="server">
Sub ddlColorListChange(ByVal S As Object, ByVal E As EventArgs)
  Dim strSelectedItem As String = ddlColorListChange.SelectedIndex.Value
  Dim conn As New OdbcConnection( connstringhere )
  Dim cmdSelect As New OdbcCommand( "SELECT * FROM table WHERE blank=?", conn )
  conn.Open()
  Dim dtrReader As OdbcDataReader = cmdSelect.ExecuteReader()
  if dtrReader.HasRows then
    ddlSecondList.DataSource = dtrReader
    ddlSecondList.DataTextField = "nameofcolumn"
    ddlSecondList.DataValueField = "nameofcolumn"
    ddlSecondList.DataBind()

    'set a selected item if you wish.
    ddlSecondList.SelectedIndex = 0
  end if
  dtrReader.Close()
  conn.Close()
End Sub
</script>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.