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

  • Home
  • SEARCH
  • 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 847055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:43:07+00:00 2026-05-15T06:43:07+00:00

This is probably something really stupidly simple.. I have a drop down list bound

  • 0

This is probably something really stupidly simple..

I have a drop down list bound to an object data source. I have set AppendDataBoundItems to true so that I can have an initial select.

<asp:DropDownList ID="Accommodations1" runat="server" AutoPostBack="true" DataTextField="AccommodationTypeDescription" DataValueField="Id" OnDataBound="Accommodations1_DataBound" onSelectedIndexChanged="Accommodations1_SelectedIndexChanged" Width="200px" DataSourceID="AccommodationDs" AppendDataBoundItems="true">
       <asp:ListItem Text="Select" Value=""></asp:ListItem>
</asp:DropDownList>

<asp:ObjectDataSource ID="AccommodationDs" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="ListByPropertyId" TypeName="PropertyAccommodationController">
      <SelectParameters>
           <asp:Parameter Name="PropertyId" Type="Int32" />
      </SelectParameters>
</asp:ObjectDataSource>

I have a button which adds an accommodaton – so after that happens I need the dropdown list to update to include the new accommodation. So I’ve tried calling databind on the dropdownlist, and databind on the datasource – and nothing is making this dropdown list update.

eg. PropertyAccommodations1.DataBind();

Could someone please let me know what I’m doing wrong. Originally I thought it was due to an update panel issue.. but I’ve removed the update panel and it still doesn’t work (and checked the master page doesn’t include an update panel).

Thanks!!

  • 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-15T06:43:08+00:00Added an answer on May 15, 2026 at 6:43 am

    Thanks for the quick responses – have implemented

    Accommodations1.Items.Insert(0,new ListItem("Select","")); 
    

    as I specifically wanted it at the top 🙂

    I still think it would be neater to have this default item in the source of the page – but that AppendDataItems is tripping me up.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 490k
  • Answers 490k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer First of all, it's a really bad idea to use… May 16, 2026 at 9:17 am
  • Editorial Team
    Editorial Team added an answer If you are not dead set on using a listbox,… May 16, 2026 at 9:17 am
  • Editorial Team
    Editorial Team added an answer killproc will terminate programs in the process list which match… May 16, 2026 at 9:17 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

This is probably something really simple, however I am quite new to PHP, and
This is probably something really simple but I cant see what! Any images I
I'm at my wits end, and it's probably something really simple. Basically I've have
It's probably something really simple, but I can't find it in the docs and
Ok. This is probably a really stupid question, but I'm going to ask it
My problem is quite annoying, probably something really stupid but I've been going around
I have something like this: $i = 0; foreach($tracks['results'] as $track){ $trackName[$i] = $track['name'];
I'm in my second day of learning Objective-C, Cocoa and IB. This is probably
I apologize if this is a basic question, however I have been searching on
I've got a small program that displays third-party generated HTML pages. It's really just

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.