creating multipls textbox at runtime using class file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • divyasrinivasan
    New Member
    • Nov 2008
    • 6

    creating multipls textbox at runtime using class file

    hi
    how to add MULTIPLE TEXTBOX at runtime using CLASS FILE

    i tried using this code for creating textbox but it did not work
    textbox t=new textbox();
    t.id="mytextbox ";
    panel p=new panel();
    p.controls.add( t);

    i want it using class file pls help its very urgent...

    thanks in advance to all
  • adarshyam
    New Member
    • Oct 2008
    • 31

    #2
    u mean dynamically?? i dunno class files n al but i ll give u wat i hav done to create textboxes according to users input ..

    put this in button click as well as in page load to make it work..

    Dim textdynamic6 As New ArrayList()

    Dim TxtDyn6 As TextBox()
    ReDim TxtDyn6(textbox 1.text)
    For n As Integer = 0 To textbox1.text - 1

    TxtDyn6(n) = New TextBox
    TxtDyn6(n).Enab leViewState = True
    Panel6.Controls .Add(TxtDyn6(n) )
    textdynamic6.Ad d(textdynamic6)
    TxtDyn6(n).Widt h = 60

    Next

    Comment

    • adarshyam
      New Member
      • Oct 2008
      • 31

      #3
      and pls help me .. i ve posted a question after this

      Comment

      • divyasrinivasan
        New Member
        • Nov 2008
        • 6

        #4
        guys i want in C# not in Vb....ya i Meant dynamically.... .pls reply its urgent pls

        Comment

        • adarshyam
          New Member
          • Oct 2008
          • 31

          #5
          divya,
          thr s a free tool available for conversion.. jus google vb.net to C# n u ll get tat.

          Comment

          • divyasrinivasan
            New Member
            • Nov 2008
            • 6

            #6
            buddy i tried it..lot of errors r coming i donno basic of vb...pls instead of giving these reply's give me the solution...

            Comment

            Working...