Dynamically created forms and textbox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kirankumar214
    New Member
    • Aug 2012
    • 3

    Dynamically created forms and textbox

    Hai there,
    i have dynamically created windows from and added a dynamic textbox and button in it, user will enter some value in that textbox and clicks the button the form will be closed on the button click, now how to store the value entered in the dynamically created textbox on a dynamically created form,
    any help on this is greatly appreciated, thanks in advance
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    When you dynamically generate the TextBoxes for the Form, you can add them to a private List(Of TextBox) member.

    This way you can loop through the list and retrieve what the user entered to store the data in the database when the user clicks the button.

    Or you can forgo the list idea and, in the button click event, you could loop through the Form's Controls Property to retrieve all of the dynamically generated TextBoxes to do your processing.

    -Frinny

    Comment

    • kirankumar214
      New Member
      • Aug 2012
      • 3

      #3
      Dear Frinny,

      Thank you very much for your response i tried with adding up in a list(of textbox), it works like charm

      thanks,

      i have one more problem, i have coded a program where it shoots mails using MS outlook working fine, but when a user who does'nt have MS outlook but has a windows live, it is not working. can u help me with some idea how to make it generic,
      note that in our office lan we also use outlook express,

      Thanks in advance

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        Check out this article:http://bytes.com/topic/net/insights/...il-using-net]A quick reference on how to send email using .net[/url]

        Please keep your thread to one question: post new questions in a new thread.

        -Frinny
        Last edited by Frinavale; Aug 13 '12, 01:46 PM.

        Comment

        Working...