|
-
May 14th, 2009, 10:23 PM
#1
Thread Starter
Addicted Member
[RESOLVED] Add textbox dynamically into html table tag
Hi,
can I know how can I add a textbox into HTML table at code behind?
Currently, I tried to add one. but instead of textbox, it shows up a gray box in that cells. (can't edit or enter any value) it appear a gray box like a label.
anyone have any idea?
thanks.
P.S: how I add textbox into table is like:
Code:
Dim txtBox As String = "<asp:TextBox style=""Z-INDEX: 0"" id=""TextBox3"" runat=""server""></asp:TextBox>"
Dim dCol As String = "<TD class=""NormalTxt"" style="............"> txtBox </TD>"
Last edited by scsfdev; May 14th, 2009 at 10:36 PM.
Reason: Add Sample Coding
-
May 14th, 2009, 11:06 PM
#2
Thread Starter
Addicted Member
-
May 15th, 2009, 12:43 AM
#3
Re: Add textbox dynamically into html table tag
From your code. I under stand that you are trying to output a control using a string content. If you say yes then you go for the Page.ParseControl method to print a control from the string
This code will output a Button control in the form
Code:
Sub Page_Load(sender As Object, e As System.EventArgs)
Dim c As Control
c = ParseControl("<asp:button text='Click here!' runat='server' />")
myPlaceholder.Controls.Add(c)
End Sub 'Page_Load
Page.ParseControl
Can't you do this way ?
Please mark you thread resolved using the Thread Tools as shown
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|