Lost universe of Programing
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Lost universe of Programing

USERNAME :- Forum Post:-114
 
HomePortalGalleryLatest imagesRegisterLog in

 

 How to Add DropDownList during Runtime in C# or Dropdown in code behind

Go down 
AuthorMessage
Administrator
Admin
Admin
Administrator


Male
Number of posts : 160
Age : 38
Location : Lucknow
Job/hobbies : Software Engeener
What U like To do ? : Because Its Rock with me.
Registration date : 2008-01-06

How to Add DropDownList during Runtime in C# or Dropdown in code behind Empty
PostSubject: How to Add DropDownList during Runtime in C# or Dropdown in code behind   How to Add DropDownList during Runtime in C# or Dropdown in code behind I_icon_minitime4/29/2009, 10:00 am

This is the code for Drop downlist when you have to add different data in dropdown during runtime.
where “Carbon” is the text value and “1″ is the Value


Code:
public void Button1_Click (object sender, System.EventArgs e)
{
this.ListBox1.Items.Add(new ListItem("Carbon", "1"));
this.ListBox1.Items.Add(new ListItem("Oxygen", "2"));
}
Back to top Go down
https://aspx.forumotion.com
 
How to Add DropDownList during Runtime in C# or Dropdown in code behind
Back to top 
Page 1 of 1
 Similar topics
-
» How to Add DropDownList during Runtime in C#
» CODE FOR LOGIN PAGE In C#
» Tool converts .Net code to Java
» Shout Down your PC source code Visual C++
» Code Conventions for the Java Programming Language

Permissions in this forum:You cannot reply to topics in this forum
Lost universe of Programing :: --=| SOURCE CODE |=-- :: CODE FOR C# & ASP.NET-
Jump to: