Emulating the VB6 control array with ASP.NET

Posted on 2006-03-22
Last Modified: 2010-04-23
I have a web form which needs to have a certain number of text boxes stacked on top of each other, which I get from a database. Underneath those text boxes are some other text boxes and buttons.

I have tried making 10 text boxes and setting visibility on the ones I need, but I can't move the other text boxes and buttons up. They are already declared in the HTML at a certain position.

I have tried adding text boxes at runtime, but the controls must be placed inside a <form> tag.

I have also tried using a datagrid, but have run into many other problems trying to accomplish what I need to accomplish.

Any help is appreciated. Thanks.
Question by:gsutphin11
    LVL 96

    Accepted Solution

    >>I have tried adding text boxes at runtime, but the controls must be placed inside a <form> tag.
    Were you trying to add the TextBox controls in the Page_Load event or the Page_PreRender event?


    Author Comment

    I was using the Page_Load event. I will try the Page_PreRender. Thanks.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
    Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now