take a look here
http://www.gfln.org/default4.aspx

now when u click on radio button 1(from 1 to 7) it generate 3 <TD> (two have text name and telephone and other have textbox which is server side control)on run time now problem is whne u click on any other radio button say greater than 1 it overlaps td

here is code behind radiobuttonlist

Protected Sub RadioButtonList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadioButtonList1.SelectedIndexChanged



 Dim newdiv As New HtmlGenericControl("div")
            Dim ht As New HtmlTable()
            ht.ID = "mytable" & index

            ht.Width = "100%"
            ht.CellSpacing = "0"
            ht.CellPadding = "0"
            ht.Border = 0


            Dim htr, htr1 As New HtmlTableRow()
            Dim htc, htc1, htc2, htc3, htc4, htc5 As New HtmlTableCell()

            Dim name_tb As New TextBox()
            name_tb.ID = "name_tb" & index
            Dim Tel_tb1 As New TextBox
            Tel_tb1.ID = "Tel_tb1" & index
            name_tb.TextMode = TextBoxMode.SingleLine

            htc.InnerText = "Name : "
            htc.Width = "20%"
            htc.Align = "Left"

            htc1.InnerText = ""
            htc1.InnerHtml = "<strong></strong>"
            htc1.Width = "10%px"

            htc2.Width = "70%"
            htc2.Align = "left"



            htc2.Controls.Add(name_tb)
            htr.Controls.Add(htc)
            htr.Controls.Add(htc1)
            htr.Controls.Add(htc2)

            ht.Controls.Add(htr)


            'make another  row 

            htc3.InnerText = "Telephone : "
            htc3.Width = "20%"
            htc3.Align = "Left"

            htc4.InnerText = ""
            htc4.InnerHtml = "<strong></strong>"
            htc4.Width = "10%px"

            htc5.Width = "70%"
            htc5.Align = "left"

            'htc3.Controls.Add(Tel_tb1)
            htr1.Controls.Add(htc3)
            htr1.Controls.Add(htc4)
            htr1.Controls.Add(htc5)



            ht.Controls.Add(htr1)

            newdiv.Controls.Add(ht)

  newdiv.Attributes.Add("table", "ht")
            newdiv.Attributes.Add("class", "right_txt_space_accm")
 Me.PlaceHolder1.Controls.Add(newdiv)


next        
end sub

please reply

Please check this out:

...
        Dim index As Integer

        For index = 1 To RadioButtonList1.SelectedValue
            Dim newdiv As New HtmlGenericControl("div")
            Dim ht As New HtmlTable()
            ht.ID = "mytable" & index

            ht.Width = "100%"
            ht.CellSpacing = "0"
            ht.CellPadding = "0"
            ht.Border = 0


            Dim htr, htr1 As New HtmlTableRow()
            Dim htc, htc1, htc2, htc3, htc4, htc5 As New HtmlTableCell()

            Dim name_tb As New TextBox()
            name_tb.ID = "name_tb" & index
            Dim Tel_tb1 As New TextBox
            Tel_tb1.ID = "Tel_tb1" & index
            name_tb.TextMode = TextBoxMode.SingleLine

            htc.InnerText = "Name : "
            htc.Width = "20%"
            htc.Align = "Left"


            htc1.InnerHtml = "<strong></strong>"
            htc1.Width = "10%"

            htc2.Width = "70%"
            htc2.Align = "left"



            htc2.Controls.Add(name_tb)
            htr.Controls.Add(htc)
            htr.Controls.Add(htc1)
            htr.Controls.Add(htc2)

            ht.Controls.Add(htr)


            'make another  row 

            htc3.InnerText = "Telephone : "
            htc3.Width = "20%"
            htc3.Align = "Left"


            htc4.InnerHtml = "<strong></strong>"
            htc4.Width = "10%px"

            htc5.Width = "70%"
            htc5.Align = "left"

            htc5.Controls.Add(Tel_tb1)
            htr1.Controls.Add(htc3)
            htr1.Controls.Add(htc4)
            htr1.Controls.Add(htc5)



            ht.Controls.Add(htr1)

            newdiv.Controls.Add(ht)

            newdiv.Attributes.Add("table", "ht")

            Me.PlaceHolder1.Controls.Add(newdiv)

        Next
..

well its good working fine now (to some extent). but need certian gaps after each table(means name,telephone row,), i need a kind of panel i.e

---------------------------------------------------------------------
Name [textbox]
Telephone [textbox]
----------------------------------------------------------------------

---------------------------------------------------------------------
Name [textbox]
Telephone [textbox]
----------------------------------------------------------------------
i hope u got my point .or do let me know if not

....


            ht.Controls.Add(htr1)

            'Add  a blank row
            Dim cell As New HtmlTableCell()
            cell.ColSpan = 3
            cell.InnerHtml = "<br/>"
            Dim row As New HtmlTableRow
            row.Cells.Add(cell)
            ht.Rows.Add(row)



            newdiv.Controls.Add(ht)

            newdiv.Attributes.Add("table", "ht")

            Me.PlaceHolder1.Controls.Add(newdiv)
....

well most of the code i have corrected but i need help for textbox width of telephone and email

here is the code

Protected Sub RadioButtonList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadioButtonList1.SelectedIndexChanged



        Dim index As Integer

        For index = 1 To RadioButtonList1.SelectedValue
            Dim newdiv As New HtmlGenericControl("div")
            Dim ht As New HtmlTable()
            ht.ID = "mytable" & index

            ht.Width = "100%"
            ht.CellSpacing = "0"
            ht.CellPadding = "0"
            ht.Border = 0


            Dim htr, htr1, htr2 As New HtmlTableRow()
            Dim cell, htc, htc1, htc2, htc3, htc4, htc5, htc6, htc7, htc8 As New HtmlTableCell()

            Dim name_tb As New TextBox()
            Dim sal_ddl As New DropDownList

            name_tb.ID = "name_tb" & index
            sal_ddl.ID = "sal_ddl" & index
            sal_ddl.Items.Add("MR")
            sal_ddl.Items.Add("Ms")
            sal_ddl.Items.Add("Mrs")



            Dim Tel_tb1 As New TextBox
            Tel_tb1.ID = "Tel_tb1" & index
            name_tb.TextMode = TextBoxMode.SingleLine

            Dim email_tb1 As New TextBox
            email_tb1.ID = "email_tb1" & index
            email_tb1.TextMode = TextBoxMode.SingleLine

            htc.InnerText = "Name : "
            htc.Width = "20%"
            htc.Align = "Left"


            'htc1.InnerHtml = "<strong></strong>"
            htc1.Controls.Add(sal_ddl)
            htc1.Width = "10%"

            htc2.Width = "70%"
            htc2.Align = "left"



            htc2.Controls.Add(name_tb)
            htr.Controls.Add(htc)
            htr.Controls.Add(htc1)
            htr.Controls.Add(htc2)

            ht.Controls.Add(htr)
           
            'make 2nd  row 

            htc3.InnerText = "Telephone : "
            htc3.Width = "20%"
            htc3.Align = "Left"


            htc4.InnerHtml = "<strong></strong>"
            htc4.Width = "10%"

            htc5.Width = "70%"
            htc5.Align = "left"

            htc5.Controls.Add(Tel_tb1)
            htr1.Controls.Add(htc3)
            htr1.Controls.Add(htc4)
            htr1.Controls.Add(htc5)

        
            ht.Controls.Add(htr1)

            'make 3rd  row 

            htc6.InnerText = "Email : "
            htc6.Width = "20%"
            htc6.Align = "Left"


            htc7.InnerHtml = "<strong></strong>"
            htc7.Width = "10%"

            htc8.Width = "70%"
            htc8.Align = "left"

            htc8.Controls.Add(email_tb1)
            htr2.Controls.Add(htc6)
            htr2.Controls.Add(htc7)
            htr2.Controls.Add(htc8)

            ht.Controls.Add(htr2)

            'Add  a blank row

            cell.ColSpan = 3
            cell.InnerHtml = "<br/>"
            Dim row As New HtmlTableRow
            row.Cells.Add(cell)
            ht.Rows.Add(row)

            newdiv.Controls.Add(ht)

            newdiv.Attributes.Add("table", "ht")

            Me.PlaceHolder1.Controls.Add(newdiv)

        Next


    End Sub

http://www.gfln.org/default4.aspx

its width/look and feel should be like position textbox in above form .

thanks adatapost for ur help so far ,take a look here http://www.gfln.org/default4.aspx ,here is some view state kind of problem in radio button.follow the steps
1 - click on 1 or what ever (from 1 to 7 )
2- click on yes Would attend the conference radio button
3- then agian click on any other daio button say 7 or whatever
4- so div created dynamially on any radio button click are hiding when click on any
5 - i need to main a state of div

if any one need code do let me know

I have created a 3 column layout website...

My question:

How do I get the 1st and 3rd column to expand to the exact height the main column is due to the amount of content the main column holds?

The amount of content varies page to page and I want my navigation column and 3rd column to mask the mains size on every page.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.