I have three drop downs -bounded with object datasources,
by default each drop down shows all countries (as i changed in prerender -st=null), cites and distt.
i need -When user select country only related cities should show under city dropdown. and when user select city-only distt related to city show up --How to do that
Here's the code

STATE:
              <asp:DropDownList ID="ddlSt" runat="server" 
              DataSourceID="OdsState"
               DataTextField="STATE_COUNTRY_NAME" 
              DataValueField="STATE_COUNTRY_CODE"
               AutoPostBack="True"  OnInit="ddlst_Init"  
                 onselectedindexchanged="ddlSt_SelectedIndexChanged" AppendDataBoundItems="true">
                 <asp:ListItem Text="" Value="0"></asp:ListItem>
          </asp:DropDownList>
          <asp:ObjectDataSource ID="OdsState" runat="server" 
              OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" 
              TypeName="stateTableAdapters.STATE_COUNTRYTableAdapter">
              <SelectParameters>
                  <asp:ControlParameter ControlID="ddlyr" Name="FromYear" 
                      PropertyName="SelectedValue" Type="Decimal" DefaultValue="null" />
                  <asp:ControlParameter ControlID="ddlTo" Name="ToYear" 
                      PropertyName="SelectedValue" Type="Decimal" />
                  <asp:ControlParameter ControlID="RBl1" Name="mytype" 
                      PropertyName="SelectedValue" Type="String" />
              </SelectParameters>
          </asp:ObjectDataSource>
                
             <asp:ObjectDataSource ID="SrcCty" runat="server" 
                 OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" 
                 TypeName="stateTableAdapters.CityTableAdapter">
                 <SelectParameters>
                     <asp:ControlParameter ControlID="ddlSt" Name="MyState" 
                         PropertyName="SelectedValue" Type="String" DefaultValue="null" />
                     <asp:ControlParameter ControlID="RBl1" Name="mytype" 
                         PropertyName="SelectedValue" Type="String" />
                     <asp:ControlParameter ControlID="ddlyr" Name="FromYear" 
                         PropertyName="SelectedValue" Type="Decimal" />
                     <asp:ControlParameter ControlID="ddlTo" Name="ToYear" 
                         PropertyName="SelectedValue" Type="Decimal" />
                 </SelectParameters>
             </asp:ObjectDataSource>
            CITY: 
            <asp:DropDownList ID="ddlCity" runat="server" DataSourceID="SrcCty"              
            DataTextField="CITY" DataValueField="STATE_COUNTRY_CODE" OnInit="ddlcity_Init" AppendDataBoundItems="true" >
            <asp:ListItem Text=" " Value="0"></asp:ListItem>
            </asp:DropDownList>   &nbsp; &nbsp;
            
             <asp:ObjectDataSource ID="SrcDistt" runat="server" 
                 OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" 
                 TypeName="stateTableAdapters.DisttTableAdapter">
                 <SelectParameters>
                     <asp:ControlParameter ControlID="RBl1" DefaultValue="&quot;G&quot;" 
                         Name="mytype" PropertyName="SelectedValue" Type="String" />
                     <asp:ControlParameter ControlID="ddlSt"  Name="myState" 
                         PropertyName="SelectedValue" Type="String" />
                     <asp:ControlParameter ControlID="ddlyr" Name="FromYear" 
                         PropertyName="SelectedValue" Type="Decimal" />
                     <asp:ControlParameter ControlID="ddlTo" DefaultValue="&quot; &quot;" 
                         Name="ToYear" PropertyName="SelectedValue" Type="Decimal" />
                     <asp:ControlParameter ControlID="ddlCity" DefaultValue="null" Name="mycity" 
                         PropertyName="SelectedValue" Type="String" />
                 </SelectParameters>
             </asp:ObjectDataSource>  
          Cong.Dist: 
           <asp:DropDownList ID="ddlCongDistt" runat="server" Width="100" AutoPostBack="true"
               DataSourceID="SrcDistt" DataTextField="congrsnl_district_code"                  
                 onselectedindexchanged="ddlCongDistt_SelectedIndexChanged" AppendDataBoundItems="true" >
                 <asp:ListItem Text="" Value="0"></asp:ListItem>
                 </asp:DropDownList> <br /> <br/>In c#

and in C#

protected void Page_Prerender(Object sender, EventArgs e)
{
if (!IsPostBack)
{

OdsState.SelectParameters["ToYear"].DefaultValue = null;
SrcCty.SelectParameters["myState"].DefaultValue = null;
SrcDistt.SelectParameters["myState"].DefaultValue = null;
SrcDistt.SelectParameters["mycity"].DefaultValue = null;
}

}
protected void RBl1_SelectedIndexChanged(object sender, EventArgs e)
{


MakeSQL(); 

}
protected void ddlst_Init(object sender, EventArgs e)
{
ddlSt.Items.Insert(0, new ListItem("--", string.Empty));

}

protected void ddlSt_SelectedIndexChanged(object sender, EventArgs e)
{


sSQL += "AND STATE_COUNTRY_CODE='" + ddlSt.SelectedValue.ToString() + "'";
MakeSQL();
}


protected void ddlcity_Init(object sender, EventArgs e)
{


ddlCity.Items.Insert(0, new ListItem("---", string.Empty));

}


protected void ddlCity_SelectedIndexChanged(object sender, EventArgs e)
{
if (ddlSt.SelectedIndex >= 0)
{
SrcCty.SelectParameters["myState"].DefaultValue = ddlSt.SelectedValue;

}

sSQL += "AND CITY='" + ddlCity.SelectedValue.ToString() + "'";
lblmsg.Text = sSQL;
MakeSQL();
}



protected void ddlCongDistt_SelectedIndexChanged(object sender, EventArgs e)
{
sSQL += "AND congrsnl_district_code ='" + ddlCongDistt.SelectedValue.ToString() + "'";
MakeSQL();
}

Hi,
Always enclose your code by BB tags.

Also you partially posted your code behind class. It does not have any definition for MakeSQL() method.

using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Collections.Specialized;
using AjaxControlToolkit;
using System.Configuration;
using System.Data.OracleClient;
using System.ComponentModel;



    public partial class Search : System.Web.UI.Page
    {
        string sSQL = " ";

        protected void Page_Prerender(Object sender, EventArgs e)
        {  
                SrcCty.SelectParameters["myState"].DefaultValue = null;
                SrcDistt.SelectParameters["myState"].DefaultValue = null;
                SrcDistt.SelectParameters["mycity"].DefaultValue = null;
                 
        }
              

        protected void Page_Load(object sender, EventArgs e)
        {
            
                if (ddlSt.SelectedIndex >= 0)
                {
                    SrcCty.SelectParameters["myState"].DefaultValue = ddlSt.SelectedValue;

                }


            //    if (IsPostBack)
            //    {
                     //}
           
            
            
            MakeSQL();
        } 
        protected void Clear_click(object sender, EventArgs e)
        {
            Response.Redirect("~/search.aspx");
            
        }
               

        protected void RBl1_SelectedIndexChanged(object sender, EventArgs e)
        {
           
           
                MakeSQL(); 
           
        }

        public void MakeSQL()
        {

            sSQL += "AND RECORD_TYPE ='" + RBl1.SelectedValue.ToString() + "'";

            Lbl1.Text = sSQL;
        }
        protected void ddlyr_SelectedIndexChanged(object sender, EventArgs e)
        {
            Int16 fmyr = Convert.ToInt16(ddlyr.SelectedValue);
            Int16 toyr = Convert.ToInt16(ddlTo.SelectedValue);
            if (fmyr > toyr)
            {
                lblYrChk.Text = "**Check Years**";
            }
            else
                lblYrChk.Text = "";
                    
         
            sSQL += "AND SOURCE_YEAR ='" + ddlyr.SelectedItem.ToString() + "'";
            MakeSQL();


        }
        
        protected void ddlTo_Clicked(object sender, EventArgs e)
        {
            string sSQLfy = "";

            string toval = ddlTo.SelectedItem.ToString();
            string fmval = ddlyr.SelectedItem.ToString();
             
            if (ddlTo.SelectedIndex != -1)
            {
                Int16 fmyr = Convert.ToInt16(ddlyr.SelectedValue); 
                Int16 toyr = Convert.ToInt16(ddlTo.SelectedValue);
                if (toyr > fmyr)
                {
                    lblYrChk.Text = "**Check Years**";
                }
                else
                    lblYrChk.Text = "";
                    
                sSQLfy = "AND SOURCE_YEAR between '" + toval + "' AND '" + fmval + "'";
                sSQL =sSQLfy.ToString();
                MakeSQL();

            }            
        }

        protected void ddlst_Init(object sender, EventArgs e)
        {
            ddlSt.Items.Insert(0, new ListItem("--", string.Empty));

        }

        protected void ddlSt_SelectedIndexChanged(object sender, EventArgs e)
        {
          
            
            sSQL += "AND STATE_COUNTRY_CODE='" + ddlSt.SelectedValue.ToString() + "'";
            MakeSQL();
        }

       
        protected void ddlcity_Init(object sender, EventArgs e)
        {
            
                       
            ddlCity.Items.Insert(0, new ListItem("---", string.Empty));

        }
        

        protected void ddlCity_SelectedIndexChanged(object sender, EventArgs e)
        {
           
            
            sSQL += "AND CITY='" + ddlCity.SelectedValue.ToString() + "'";
            lblmsg.Text = sSQL;
            MakeSQL();
        }



        protected void ddlCongDistt_SelectedIndexChanged(object sender, EventArgs e)
        {
            sSQL += "AND  congrsnl_district_code ='" + ddlCongDistt.SelectedValue.ToString() + "'";
            MakeSQL();
        }

        protected void ddlBudCode_SelectedIndexChanged(object sender, EventArgs e)
        {

            sSQL += "AND BMM_CCR_CODE ='" + ddlBuccr.SelectedValue.ToString() + "'";
            MakeSQL();
        }
        protected void ddlBmmCode_SelectedIndexChanged(object sender, EventArgs e)
        {

            sSQL += "AND BMM_CODE ='" + ddlBmm.SelectedValue.ToString() + "'";
            MakeSQL();
        }

        protected void Btn_check(object sender, EventArgs e)
        {lblmsg.Text ="you have selected" +
                     ddlTo.SelectedValue.ToString() +"-->" +
                     ddlyr.SelectedValue.ToString() +"-->" +
                    ddlSt.SelectedValue.ToString() + "-->" +
                 ddlCity.SelectedValue.ToString();
        }
}
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="~/Search.aspx.cs" Inherits="Search" MasterPageFile="~/hits_main.master"%>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:ScriptManager ID="ScrptMgr1" runat="server"></asp:ScriptManager>
<div>
<asp:UpdatePanel runat="server" ID="Up1">
<ContentTemplate>
    <table  cellspacing="10" border=".02">   
    <tr>   
      <td   align="left"  > 
          <asp:RadioButtonList ID="RBl1" runat="server" AutoPostBack="True"                               
                                CellPadding="2" CellSpacing="5" 
              onselectedindexchanged="RBl1_SelectedIndexChanged">
            <asp:ListItem  Value="G" Selected="True" >Regular Grants</asp:ListItem>
           <%-- <asp:ListItem Value ="A">ARRA Grants</asp:ListItem>--%>
            <asp:ListItem Value ="C">Contract</asp:ListItem>
            </asp:RadioButtonList>                 
         
         </td>
        
         <td>
          <asp:ObjectDataSource ID="Srcfmyr" runat="server" 
                 OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" 
                 TypeName="HITS.App_code.stateTableAdapters.SOURCE_YEAR_VWTableAdapter">                 
                 <SelectParameters>
                     <asp:ControlParameter ControlID="RBl1" Name="myType" 
                         PropertyName="SelectedValue" Type="String" DefaultValue="G" />
             </SelectParameters>
             </asp:ObjectDataSource>
           From: <asp:DropDownList ID="ddlyr" runat="server"
                     OnSelectedIndexChanged="ddlyr_SelectedIndexChanged"    
                AutoPostBack="True" DataSourceID="Srcfmyr" 
                DataTextField="SOURCE_YEAR"              
                DataValueField="SOURCE_YEAR"  Font-Underline="False" >
            </asp:DropDownList>&nbsp; &nbsp; &nbsp; 
              
          <asp:ObjectDataSource ID="SrcToyr" runat="server" 
                 OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" 
                 TypeName="HITS.App_code.stateTableAdapters.SOURCE_YEAR_VWTableAdapter">
                 <SelectParameters>
                     <asp:ControlParameter ControlID="RBl1"
                      DefaultValue="G" Name="myType" 
                         PropertyName="SelectedValue" 
                         Type="String" />
                 </SelectParameters>
            </asp:ObjectDataSource>
             <asp:Label ID="lblTo" runat ="server" Text="To:"></asp:Label>
            <asp:DropDownList ID="ddlTo" runat="server"  
                AutoPostBack="True" DataSourceID="Srcfmyr" 
                DataTextField="SOURCE_YEAR" 
                DataValueField="SOURCE_YEAR"  
                Font-Underline="False"
                 OnSelectedIndexChanged="ddlTo_Clicked"   >
            </asp:DropDownList>
            <br />
             <asp:Label ID="lblYrChk" runat="server" Text=" " ForeColor="#993300"></asp:Label>          
         </td>
         </tr>
         <tr>  
         <td  colspan="2" align="left" valign="middle">
         <br /> <br/>
         STATE:
              <asp:DropDownList ID="ddlSt" runat="server" 
              DataSourceID="OdsState"
               DataTextField="STATE_COUNTRY_NAME" 
              DataValueField="STATE_COUNTRY_CODE"
               AutoPostBack="True"  OnInit="ddlst_Init"  
                 onselectedindexchanged="ddlSt_SelectedIndexChanged" AppendDataBoundItems="true">
                 <asp:ListItem Text="" Value="0"></asp:ListItem>
          </asp:DropDownList>
          <asp:ObjectDataSource ID="OdsState" runat="server" 
              OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" 
              TypeName="stateTableAdapters.STATE_COUNTRYTableAdapter">
              <SelectParameters>
                  <asp:ControlParameter ControlID="ddlyr" Name="FromYear" 
                      PropertyName="SelectedValue" Type="Decimal" DefaultValue="null" />
                  <asp:ControlParameter ControlID="ddlTo" Name="ToYear" 
                      PropertyName="SelectedValue" Type="Decimal" />
                  <asp:ControlParameter ControlID="RBl1" Name="mytype" 
                      PropertyName="SelectedValue" Type="String" />
              </SelectParameters>
          </asp:ObjectDataSource>
                
             <asp:ObjectDataSource ID="SrcCty" runat="server" 
                 OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" 
                 TypeName="stateTableAdapters.CityTableAdapter">
                 <SelectParameters>
                     <asp:ControlParameter ControlID="ddlSt" Name="MyState" 
                         PropertyName="SelectedValue" Type="String" DefaultValue="null" />
                     <asp:ControlParameter ControlID="RBl1" Name="mytype" 
                         PropertyName="SelectedValue" Type="String" />
                     <asp:ControlParameter ControlID="ddlyr" Name="FromYear" 
                         PropertyName="SelectedValue" Type="Decimal" />
                     <asp:ControlParameter ControlID="ddlTo" Name="ToYear" 
                         PropertyName="SelectedValue" Type="Decimal" />
                 </SelectParameters>
             </asp:ObjectDataSource>
            CITY: 
            <asp:DropDownList ID="ddlCity" runat="server" DataSourceID="SrcCty"              
            DataTextField="CITY" DataValueField="STATE_COUNTRY_CODE" OnInit="ddlcity_Init" AppendDataBoundItems="true" >
            <asp:ListItem Text=" " Value="0"></asp:ListItem>
            </asp:DropDownList>   &nbsp; &nbsp;
            
             <asp:ObjectDataSource ID="SrcDistt" runat="server" 
                 OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" 
                 TypeName="stateTableAdapters.DisttTableAdapter">
                 <SelectParameters>
                     <asp:ControlParameter ControlID="RBl1" DefaultValue="&quot;G&quot;" 
                         Name="mytype" PropertyName="SelectedValue" Type="String" />
                     <asp:ControlParameter ControlID="ddlSt"  Name="myState" 
                         PropertyName="SelectedValue" Type="String" />
                     <asp:ControlParameter ControlID="ddlyr" Name="FromYear" 
                         PropertyName="SelectedValue" Type="Decimal" />
                     <asp:ControlParameter ControlID="ddlTo" DefaultValue="&quot; &quot;" 
                         Name="ToYear" PropertyName="SelectedValue" Type="Decimal" />
                     <asp:ControlParameter ControlID="ddlCity" DefaultValue="null" Name="mycity" 
                         PropertyName="SelectedValue" Type="String" />
                 </SelectParameters>
             </asp:ObjectDataSource>  
          Cong.Dist: 
           <asp:DropDownList ID="ddlCongDistt" runat="server" Width="100" AutoPostBack="true"
               DataSourceID="SrcDistt" DataTextField="congrsnl_district_code"                  
                 onselectedindexchanged="ddlCongDistt_SelectedIndexChanged" >
                
                 </asp:DropDownList> <br /> <br/>
         </td>
         
         </tr>
         <tr>
         <td colspan="2" align="left" valign="middle">          
             <asp:Label ID="lblbud" runat="server" Text="**Budget Codes- Yr.2005 onwards**" ForeColor="Red"></asp:Label>
             <br />           
         BMM_CCR_ Code: 
          <asp:DropDownList ID="ddlBuccr" runat="server" AutoPostBack= "true" Width="100" 
                    DataSourceID="SrcBudCCR"  DataTextField="BMM_CCR_CODE"  
                    DataValueField="BMM_CCR_CODE">            
            </asp:DropDownList>
           
             <asp:ObjectDataSource ID="SrcBudCCR" runat="server" 
                 OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" 
                 TypeName="stateTableAdapters.ccR_BudTableAdapter">
                 <SelectParameters>
                     <asp:ControlParameter ControlID="ddlyr" Name="FromYear" 
                         PropertyName="SelectedValue" Type="Decimal" />
                     <asp:ControlParameter ControlID="ddlTo" DefaultValue="&quot; &quot;" 
                         Name="ToYear" PropertyName="SelectedValue" Type="Decimal" />
                 </SelectParameters>
             </asp:ObjectDataSource>
             <asp:ObjectDataSource ID="SrcBmm" runat="server" 
                 OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" 
                 TypeName="stateTableAdapters.Bud_codeTableAdapter">
                 <SelectParameters>
                     <asp:ControlParameter ControlID="ddlyr" Name="FromYear" 
                         PropertyName="SelectedValue" Type="Decimal" />
                     <asp:ControlParameter ControlID="ddlTo" DefaultValue="&quot; &quot;" 
                         Name="ToYear" PropertyName="SelectedValue" Type="Decimal" />
                     <asp:ControlParameter ControlID="ddlBuccr" DefaultValue="" Name="mybudCcr" 
                         PropertyName="SelectedValue" Type="String" />
                 </SelectParameters>
             </asp:ObjectDataSource> &nbsp; &nbsp;
             BMM_Code:
             <asp:DropDownList ID="ddlBmm" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlBmmCode_SelectedIndexChanged"
             DataSourceID="SrcBmm" DataTextField="BMM_CODE" DataValueField="BMM_CCR_CODE" >             
             </asp:DropDownList>
         </td>
         <td colspan="2" align="left" valign="middle">
             <asp:ObjectDataSource ID="SrcThrst" runat="server" 
                 OldValuesParameterFormatString="original_{0}" 
                 SelectMethod="GetData" 
                 TypeName="stateTableAdapters.HITS_THRUSTS_VWTableAdapter">
                 <SelectParameters>
                     <asp:ControlParameter ControlID="ddlyr" Name="FromYear" 
                         PropertyName="SelectedValue" Type="Decimal" />
                     <asp:ControlParameter ControlID="ddlTo" DefaultValue="&quot; &quot;" 
                         Name="ToYear" PropertyName="SelectedValue" Type="Decimal" />
                 </SelectParameters>
             </asp:ObjectDataSource>
         Thurst:
         <asp:DropDownList ID="ddlthrst"  AutoPostBack="true" runat="server" 
         DataSourceID="SrcThrst" DataTextField="THT_CODE" >
         </asp:DropDownList>&nbsp; &nbsp;
             <asp:ObjectDataSource ID="Srcdiv" runat="server" 
                 OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" 
                 TypeName="stateTableAdapters.HITS_DIVISION_VWTableAdapter">
                 <SelectParameters>
                     <asp:ControlParameter ControlID="ddlyr" Name="FromYear" 
                         PropertyName="SelectedValue" Type="Decimal" />
                     <asp:ControlParameter ControlID="ddlTo" Name="ToYear" 
                         PropertyName="SelectedValue" Type="Decimal" />
                 </SelectParameters>
             </asp:ObjectDataSource>
         Division: 
         <asp:DropDownList ID="ddlDiv"
                          AutoPostBack="true" runat="server" 
                         DataSourceID="Srcdiv" DataTextField="DIVISION">
         </asp:DropDownList>
         
         <br /><br />
             <asp:ObjectDataSource ID="SrcAct" runat="server" 
                 OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" 
                 TypeName="stateTableAdapters.HITS_ACTIVITY_CODES_VWTableAdapter">
                 <SelectParameters>
                     <asp:ControlParameter ControlID="ddlyr" Name="FromYear" 
                         PropertyName="SelectedValue" Type="Decimal" />
                     <asp:ControlParameter ControlID="ddlTo" DefaultValue="&quot; &quot;" 
                         Name="ToYear" PropertyName="SelectedValue" Type="Decimal" />
                 </SelectParameters>
                 </asp:ObjectDataSource>
         <asp:ObjectDataSource ID="SrcCAN" runat="server" 
                 OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" 
                 TypeName="stateTableAdapters.HITS_CANS_VWTableAdapter">
             <SelectParameters>
                 <asp:ControlParameter ControlID="ddlyr" Name="FromYear" 
                     PropertyName="SelectedValue" Type="Decimal" />
                 <asp:ControlParameter ControlID="ddlTo" Name="ToYear" 
                     PropertyName="SelectedValue" Type="Decimal" />
             </SelectParameters>
             </asp:ObjectDataSource>             
        
         Activity Code:
         <asp:DropDownList  ID="ddlAct"  AutoPostBack="true" runat="server" 
         DataSourceID="SrcAct" DataTextField="ACTIVITY_CODE">
         
         </asp:DropDownList>  &nbsp; &nbsp;
         CAN: <asp:DropDownList ID="ddlCAN" AutoPostBack="true" runat="server" DataSourceID="SrcCAN"  DataTextField="CAN" >
         
         </asp:DropDownList>  
         </td>
         </tr> 
         <tr>
         <td  align="left" valign="middle">
             <asp:ObjectDataSource ID="SrcOrg" runat="server" 
                 OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" 
                 TypeName="stateTableAdapters.HITS_ORGANIZATIONS_VWTableAdapter">
                 <SelectParameters>
                     <asp:ControlParameter ControlID="ddlyr" Name="FromYear" 
                         PropertyName="SelectedValue" Type="Decimal" />
                     <asp:ControlParameter ControlID="ddlTo" Name="ToYear" 
                         PropertyName="SelectedValue" Type="Decimal" />
                     <asp:ControlParameter ControlID="RBl1" Name="mytype" 
                         PropertyName="SelectedValue" Type="String" />
                 </SelectParameters>
             </asp:ObjectDataSource>
         
            Organization:
            <asp:DropDownList ID="ddlOrg" runat="server" DataSourceID="SrcOrg" AppendDataBoundItems="true"
             DataTextField="ORG_NAME" 
             AutoPostBack="True">
             <asp:ListItem Text="" Value="0"></asp:ListItem>      
            
            </asp:DropDownList> &nbsp; &nbsp; &nbsp;
            <%-- <asp:ObjectDataSource ID="SrcInvstg" runat="server" 
                 OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" 
                 TypeName="stateTableAdapters.InvstgatorTableAdapter">
                 <SelectParameters>
                     <asp:ControlParameter ControlID="RBl1" DefaultValue="&quot;G&quot;" 
                         Name="mytype" PropertyName="SelectedValue" Type="String" />
                     <asp:ControlParameter ControlID="ddlyr" DefaultValue="" Name="FromYear" 
                         PropertyName="SelectedValue" Type="Decimal" />
                     <asp:ControlParameter ControlID="ddlTo" DefaultValue="&quot; &quot;" 
                         Name="ToYear" PropertyName="SelectedValue" Type="Decimal" />
                     <asp:ControlParameter ControlID="ddlSt" DefaultValue="" Name="myState" 
                         PropertyName="SelectedValue" Type="String" />
                 </SelectParameters>
             </asp:ObjectDataSource>
            Investigator: 
            <asp:DropDownList ID="ddlInvstg" runat="server" DataSourceID="SrcInvstg" 
            DataTextField="Investigator" 
                 DataValueField="STATE_COUNTRY_CODE" 
                 AutoPostBack="True">
            
            </asp:DropDownList>--%>
         </td>
         
         </tr> 
         <tr>
         <td align="left"> 
            <asp:Button ID="clear" OnClick="Clear_click" runat="server" Text="Clear"/>
            <asp:Button ID="Check" OnClick="Btn_check" runat="server" Text="check" />
           
           </td>
           </tr>          
         </table>  
         
         </hr>
            <asp:Label ID="Lbl1" runat="server" ForeColor="Blue"></asp:Label>   
        <asp:Label ID="lblmsg" runat='server' ForeColor="Red"></asp:Label> 
      
        <asp:Label ID="mesg" runat="server" Text="" ForeColor="Red"></asp:Label>
        <asp:Label ID="lblFm" runat="server" Text=""></asp:Label>
        <asp:Label ID="LblyTo" runat="server" Text=""></asp:Label>
        
        
                              

 </ContentTemplate>
 </asp:UpdatePanel>
 </div>
 
 

 
 
</asp:Content>

dnanetwork,
Please, add suitable comments regarding to the question.

Basically its a bit difficult to analyze your code but you can follow the below steps:
1. Bind first dropdownlist under page load event. Keep other two's blank.
2. When user select first DD then populate 2nd DD based on the selected value & clear 3rd DD cause may user select this more than one time so that previously populated third DD value now meaningless for currentselection of first DD.
3. When User select 2nd DD then populate 3rd one.

Here i found that you can bind data. You knew the selectedindexchange event. So just follow the above 3 steps will resolve your problem.

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.