Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>check out following links for populating cascading drop down list.</p> <p><a href="http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/CascadingDropDown/CascadingDropDown.aspx" rel="nofollow">http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/CascadingDropDown/CascadingDropDown.aspx</a></p> <p><a href="http://www.codeproject.com/KB/aspnet/CascadingDropDown.aspx" rel="nofollow">http://www.codeproject.com/KB/aspnet/CascadingDropDown.aspx</a></p> <p><a href="http://www.aspsnippets.com/Articles/Creating-Cascading-DropDownLists-in-ASP.Net.aspx" rel="nofollow">http://www.aspsnippets.com/Articles/Creating-Cascading-DropDownLists-in-ASP.Net.aspx</a></p> <p>Code:</p> <pre><code>&lt;table&gt; &lt;tr&gt; &lt;td&gt;First&lt;/td&gt; &lt;td&gt;&lt;asp:DropDownList ID="DDLFirst" runat="server" AutoPostBack="true" onselectedindexchanged="DDLFirst_SelectedIndexChanged"&gt;&lt;/asp:DropDownList&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Secord&lt;/td&gt; &lt;td&gt;&lt;asp:DropDownList ID="DDLSecond" runat="server" AutoPostBack="true" onselectedindexchanged="DDLSecond_SelectedIndexChanged"&gt; &lt;asp:ListItem Text="Select" Value="Select"&gt;&lt;/asp:ListItem&gt; &lt;/asp:DropDownList&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Thrid&lt;/td&gt; &lt;td&gt;&lt;asp:DropDownList ID="DDLThird" runat="server"&gt;&lt;asp:ListItem Text="Select" Value="Select"&gt;&lt;/asp:ListItem&gt; &lt;/asp:DropDownList&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre> <p>// Code behind protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { // your code to bind the first drop downlist</p> <pre><code> } } protected void DDLFirst_SelectedIndexChanged(object sender, EventArgs e) { if (DDLFirst.SelectedIndex &gt; 0) { string FirstDDLValue = DDLFirst.SelectedItem.Value; // below your code to get the second drop down list value filtered on first selection } } protected void DDLSecond_SelectedIndexChanged(object sender, EventArgs e) { if (DDLSecond.SelectedIndex &gt; 0) { string SecondDDLValue = DDLSecond.SelectedItem.Value; // below your code to get the third drop down list value filtered on Second selection } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload