Click here to Skip to main content
15,905,504 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
Hello sir
In my project there is two dropdown list.In first dropdown there are various state name and when I select any state in another dropdown the college name are coming of that specific state.

So my problem is that when I select state it is taking time to bring the college name in another dropdown.

Is there any way for speed up process or

any other process by which client will not be confused.

If any solution then please send me.

Thanks In Advance
Posted
Comments
Sergey Alexandrovich Kryukov 27-Dec-11 23:40pm    
I never saw such things to be slow, unless you put so many items which would make the application unusable anyway. So, the only reason I can see: you did it wrong. But please understand: we don't have access to your hard drive. So, how can we know where did you screw up?
--SA
Varun Sareen 28-Dec-11 2:47am    
absolutely write SAKryukov

Dear Friend,

You can take the use of delegate functionality.

6 important uses of Delegates and Events[^]

A Beginner's Guide to Delegates[^]

A Study of Delegates[^]

Delegates and their role in Events in C# .NET[^]

Or you can take the help of ajax functionality or update panel

Hope it helps you out.

Thanks

Thanks
 
Share this answer
 
Dear Friend,

You can take the use of delegate functionality.

6 important uses of Delegates and Events[^]

A Beginner's Guide to Delegates[^]

A Study of Delegates[^]

Delegates and their role in Events in C# .NET[^]

Or you can take the help of ajax functionality or update panel

Hope it helps you out.

Thanks
 
Share this answer
 
If this list of values is constant(means you are not changing in DB regularly) then you can use cache. Read states and colleges in cache while application start. Read this combo list data from cache. Then it will be fast
 
Share this answer
 
Hello friend,

You can use update panel for this updation of one dropdownlist. and from this complete page will not load.
just put your dropdownlist in update panel and add scriptmanager on the page. and check your query also , that how much time it is taking to fetch data from database.
like :
XML
<asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
<asp:dropdownlist id="ddlName" runat="server" autopostback="True" onselectedindexchanged="ddlName_SelectedIndexChanged" xmlns:asp="#unknown">
                                                                <asp:listitem value="0">-Select-</asp:listitem>
                                                            </asp:dropdownlist>
<br />
<asp:dropdownlist id="ddlCollege" runat="server" autopostback="True" onselectedindexchanged="ddlCollege_SelectedIndexChanged" xmlns:asp="#unknown">
                                                                <asp:listitem value="0">-Select-</asp:listitem>
                                                            </asp:dropdownlist>

And bind it on the page on the ddlName_SelectedIndexChanged.
hope this will help you.
feel free to ask.
Dont forget to mark as answer if it helps. :)
 
Share this answer
 
Hello JBSAHU

If you want to spped up the process then just use Ajax.

Just drag and drop the Script Manager on your page

XML
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>


For eg this is your City dropdownlist


XML
<asp:DropDownList ID="drpCity" runat="server" AutoPostBack="True"
                            onselectedindexchanged="drpCity_SelectedIndexChanged" >
                        </asp:DropDownList>


And this is your College dropdownlist

XML
<asp:UpdatePanel ID="UpdatePanel3" runat="server">
                       <ContentTemplate>
                           <asp:Dropdownlist ID="drpCollege" runat="server" Width="195px"  >
                           </asp:Dropdownlist>
                       </ContentTemplate>
                       <Triggers>
                       <asp:AsyncPostBackTrigger ControlID="drpCity" EventName="SelectedIndexChanged" />
                       </Triggers>
                       </asp:UpdatePanel>




This will increase the speed of your application...

....Sachin....
 
Share this answer
 
You can use pure AJAX to fill dependent drop-down. Instead of making server trip use Javascript and AJAX to fill College drop-down.

Thanks
Vinod
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900