howto append new list item in the aspx dropdownlist

this guide will tell you how to append new list item to the existing listitems in the aspx dropdown list.

1. make sure you activate the AppendDataBoundItems at the dropdownlist control, set the value to be true. AppendDataBoundItems=”true”

2. insert the following code in the code behin:
ddlObject.Items.Insert(0, new ListItem(”Default text”, “Default value”));

change the ddlObject name to your dropdownlist object name.

Advertisements
Posted in .NET, Web Development
2 comments on “howto append new list item in the aspx dropdownlist
  1. Woy, minta kontaklu dong! YM ke, apa ke, pokoknya yang OL deh!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Branbench.com Certified
VB.Net Fundamental

RDBMS Developer

Win XP Fundamentals

Networking Concept

Html 3.2

c sharp is cool

Network Security

MS Sharepoint Portal Certifiedl
RMHD.wordPress.com
Blog Stats
  • 9,637 hits
Top Clicks
  • None
Hari-hari ngepost
August 2009
M T W T F S S
« Jul    
 12
3456789
10111213141516
17181920212223
24252627282930
31  
%d bloggers like this: