Drop Down / AutoPostBack refreshes entire page

Posted on 2009-12-16
Last Modified: 2012-05-08
-SQL 2005

I'm developing a very simple front end for an asset management system. To make it a short story, I have two drop down boxes, both populated by SQL queries. Let's call them Make and Model.

Make is populated automatically during the page load with data from the Make table. Model is a subsequent query, based on the drop-down selection of the Make. Quick example..

Make = Dell

Model is populated with (select model_name from model where make='Dell').. so it might display the following choices..


The problem arises when 'Make' is chosen. I'm using the AutoPostBack=True method to refresh the model query. This, however, refreshes the entire page. There's a lot on this page that I haven't mentioned, which makes this method very slow.

How do I have just the drop-down list / query results refresh, without the entire page? Is there an easy method using ASP/VB to do this? From what I understand, Ajax would probably be an easy solution, but I don't even know where to being with Ajax (so if that's your suggestion, I would very much appreciate a link to a simple tutorial).



Question by:Brandon_Sidley
    LVL 4

    Expert Comment

    Yep AJAX is your best bet.

    Most tutorials are in C# though...
    LVL 7

    Expert Comment

    Since your need is too tiny, you can use UpdatePanel Control, which will avoid the whole page reloading.

    you can reach that here.,
    LVL 18

    Assisted Solution

    by:Richard Lee
    Wrap the drop down list in an UpdatePanel.

    <asp:UpdatePanel runat="server">
           // Place drop down lists here

    LVL 7

    Accepted Solution

    When you use UpdatePanel as below, you should have a <asp:ScriptManager ID="smTest" runat="server" > </asp:ScriptManager> for the page.

    then, you can use the following code.,

    <asp:UpdatePanel runat="server">
           // Place drop down lists here
    LVL 18

    Expert Comment

    by:Rajar Ahmed
    Ajax tutorial dat loads data from db without page refresh  refresh ....

    This examples shows wat i mentioning . u need just to configure dat combobox instead of that table load on the onchange of combobox in that demo .

    Can u try this ??


    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now