Can I set a databound drop down list to be blank on page load without changing the database?

Posted on 2008-11-13
Last Modified: 2013-12-17
Can I set a databound drop down list to be blank on page load without changing the database? If so how? Thanks
Question by:dwezil
    LVL 2

    Expert Comment

    Surpress the databinding. Somewhere you have a part in the code, where you call Control.DataBind().

    If you want enabling just for postbacks, then use something like this.


    Open in new window


    Accepted Solution

    AppendDataBoundItems works

    <asp:DropDownList runat="server" AppendDataBoundItems="true">
        <asp:ListItem>- - SELECT SOMETHING - -</asp:ListItem>
    LVL 3

    Expert Comment

    by:Rupesh P
    I assume you want to clear the control in page load. rt? If So,
    should do the job


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
    More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    758 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

    11 Experts available now in Live!

    Get 1:1 Help Now