Search
Winners

Win Prizes

Social Presence
Twitter Twitter LinkedIn YouTube Google

Like us on Facebook
Advertisements
Top Forums Author
Fri, 25-Jul-2014 Authors
Murugavelmsc
10
All Time Authors
Jayakumars
4120
Karthikanbarasan
3455
Chvrsri
3140

Latest members | More ...


(Statistics delayed by 5 minutes)

how to bind 3 list items in the asp.net dropdownlist using Javascript

Macson
Posted by Macson under JavaScript on 7/3/2009 10:14:39 PM | Views : 5245 | Status : [Member] | Replies : 1


how to bind 3 list items in the asp.net dropdownlist using Javascript



Posted by: Vuyiswamb on: 7/6/2009 [Member] [MVP] [Administrator] NotApplicable

Good Day

It can be done this way

script type="text/javascript">

function AddItem(Text,Value)
{
// Create an Option object var opt = document.createElement("option");

// Add an Option object to Drop Down/List Box
document.getElementById("DropDownList").options.add(opt); // Assign text and value to Option object
opt.text = Text;
opt.value = Value;

}<script />


Thank you for posting at DotnetFunda

Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

Macson, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response


Found interesting? Add this to: