Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 936863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:22:52+00:00 2026-05-15T21:22:52+00:00

I have a dropdownlist (asp.net) and when user change the selection and i want

  • 0

I have a dropdownlist (asp.net) and when user change the selection and i want to display the div based on the selected from dropdownlist.

i have code here…

    <asp:DropDownList ID="ddlFilter" runat="server" Width="221px">
        <asp:ListItem Text="Select..." Value=""></asp:ListItem>
        <asp:ListItem Text="Date" Value="DATE"></asp:ListItem>
        <asp:ListItem Text="Subject" Value="SUBJECT"></asp:ListItem>
        <asp:ListItem Text="Status" Value="STATUS"></asp:ListItem>
    </asp:DropDownList>
    &nbsp;
    <asp:Button ID="btnSearch" Text="Search" runat="server" />




    <div id="divDateRangeSearch">
        <div style="float: left">
            <asp:Label ID="lblDateRange" runat="server" Text="Date Range"></asp:Label>
            <br />
            <uc1:DatePicker ID="FromDate" runat="server"  />
            <uc1:DatePicker ID="ToDate" runat="server"  />
        </div>
    </div>


    <div id="divSearchSubject" >
        <div style="float: left">
            <asp:Label ID="lblSubject" runat="server" Text="Subject"></asp:Label><br />
            <asp:TextBox ID="txtSubject" runat="server" Width="225px"></asp:TextBox>
        </div>
    </div> 


    <div id="divStatusSearch">
        <div style="float: left">
            <asp:Label ID="lblStatus" runat="server" Text="Status" ></asp:Label>
            <br />
            <asp:DropDownList ID="ddStatus" runat="server" Width="152px" >
            </asp:DropDownList>
        </div>
    </div>

Updated:

<div  style="width: 880px; padding-top: 2px; border-bottom: none;
            height: 28px;">
            <asp:Label ID="lblFilterResultsBy" runat="server" Text="Filter Results by:"></asp:Label>

            <asp:DropDownList ID="ddlFilter" runat="server" Width="221px">
        <asp:ListItem Text="Select..." Value=""></asp:ListItem>
        <asp:ListItem Text="Date" Value="DATE"></asp:ListItem>
        <asp:ListItem Text="Subject" Value="SUBJECT"></asp:ListItem>
        <asp:ListItem Text="Status" Value="STATUS"></asp:ListItem>
    </asp:DropDownList>
            &nbsp;
              <div id="div_date"  style="width:250px; display:none;  "  class="sectionrowDate">
                 <div style="float: left">
                    <asp:Label ID="lblDateRange" runat="server" Text="Date Range" ></asp:Label>
                    <br />
                    <uc1:DatePicker ID="FromDate" runat="server"  />
                    <uc1:DatePicker ID="ToDate" runat="server"  />
                    </div>
            </div>

            <asp:Button ID="btnSearch" Text="Search" runat="server" />  
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T21:22:52+00:00Added an answer on May 15, 2026 at 9:22 pm
    $('#ddlFilter').change(function(){
       var sel = $(this).val();
       if(sel === 'DATE'){
         hideAll();// a function to hide all the divs first
         $('#divDateRangeSearch').show();
       } else if(sel === 'SUBJECT'){
         ///so on...
       }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a dropdownlist (asp.net) and when user change the selection from the dropdownlist
I have asp:DropDownList control which i want to display data to user who don't
I have an ASP.NET DropDownList control that retrieves the first and last name from
i have the following code in an asp.net mvc view. <% = Html.DropDownList(Filter, new
I have an asp.net mvc application where I want to hide/display part of form
i have a dropdownlist control in asp.net which resides in a user control .The
Is there anyway to have items in an ASP.NET DropDownList have either their Text
I have a asp.net 2.0 web site with numerous asp:DropDownList controls. The DropDownList control
I am using Asp.net dropdownlist in one of my form ..I have two dropdown
What's the best method for handling a situation where you have an ASP.Net Dropdownlist

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.