Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
I have some text box and one dropdownlist.I want to insert into table (additem).
Posted
Comments
R. Giskard Reventlov 15-Nov-11 2:09am    
So go ahead and do so. You gave not really asked a question and neither have you shown us what you have tried for yourself.

 
Share this answer
 
v2
For adding control in table you can do somthing like this In HTML
<table id="test"  runat="server">


and in code behind>.For Example i am adding text box in table


TextBox text = new TextBox();
          test.Controls.Add(text);


And just for adding item in dropdown you can do somthing like this

''' adds a row to a drop down menu. In old code line no  62 to 78
   '''
   ''' <param name="dropDown"></param>
   ''' <param name="text"></param>
   ''' <param name="value"></param>
   ''' <remarks></remarks>
   Sub addDropDownItem(ByVal dropDown As DropDownList, ByVal text As String, ByVal value As String)
       Dim dropDownItem As New ListItem
       dropDownItem.Text = text.ToString()
       dropDownItem.Value = value.ToString()
       dropDown.Items.Add(dropDownItem)
       dropDown.DataBind()
   End Sub
 
Share this answer
 
v2
Comments
RaviRanjanKr 15-Nov-11 2:34am    
[Edited]Code is wrapped in "pre" tag[/Edited]
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900