Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8584523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:47:36+00:00 2026-06-11T21:47:36+00:00

I have a form where I’m adding TextBox with a [+] button, the first

  • 0

I have a form where I’m adding TextBox with a [+] button, the first textbox and button is created at runtime, so, the code to define the Click event of the button is (or should be) something like:

AddHandler button1.Click, AddressOf ButtonPlusClick

No problem so far, but the problem is: I need 2 parameters in ButtonPlusClick(): panel ID where I’m going to add textbox, as the page has an extense list of controls and sequence number of last TextBox created, in order to not repeat ID’s in the page.

So here I get lost, all I’ve searched talks about delegates like:

Delegate Sub MySubDelegate(ByVal container As Panel, ByVal nseq As Integer)
Dim msd As MySubDelegate
msd = AddressOf ButtonPlusClick
msd.invoke(Panel1, 3)

But, hey, I’m not invoking now but defining the button1.Click event which must call a function that needs parameters, can you help me or point to some documentation?

(the final result would be a list like, and all this is created by a Class’s code):

[TextBox] [+]
[TextBox] [+]
[TextBox] [+]

)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T21:47:37+00:00Added an answer on June 11, 2026 at 9:47 pm

    You could use a Dictionary(Of String, Int32). The key is the ID of the panel and the value is the count of already created TextBoxes.

    Then you can use FindControl(panelID) to get the reference to your Panel. You need to recreate the TextBoxes from the count in Page_Load at the latest. Derive the ID’s from the consecutive number, for example “TextBox_1”, “TextBox_2″… “TextBox_10”, where 10 is the Value in the dictionary for this panel.

    In the event handler you only have to call the method which creates one textbox and sum up 1 to the dictionary value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have form with 1 button. when you click on the button 3 others
I have form with a textbox and filefield in django. It should let the
I have form area in my view. If I click button A , I
I have form autocomplete code that executes when value changes in one textbox. It
I have form with few buttons and I want to know what button is
I have form in VB.Net 2010: I want to click-drag multi rows in dgRegister
I have form with web browser component, there is a button which triggers page
I have Form on which i am drawing oval on mouseClick Event. This works
I have form with button and checkbox. if i hit button static void is
I have form created by the admin generator in the backend of a website.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.