473,320 Members | 1,926 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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
Aug 8 '12 #1
3 1686
Frinavale
9,735 Expert Mod 8TB
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
Aug 8 '12 #2
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
Aug 11 '12 #3
Frinavale
9,735 Expert Mod 8TB
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
Aug 13 '12 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Gelios | last post by:
Hello all! I have a Windows.Forms code where I dynamically created controls. How can I access to properties from event handler? For example: createSomeControls() { TextBox textBox = new...
1
by: - vhannak | last post by:
I have a main form that can create and display multiple other (sub)forms at the click of a button. Each time a new subform is created, I want the main form to increment a counter to indicate how...
2
by: R Duke | last post by:
I have tried everything I can think of to change the visible property of a design time created control from a dynamically created control's command event handler. Here is the scenario. I have...
1
by: Shilpi Chaudhry | last post by:
I have a forloop which I use to create textboxes - but unfortunately all of them have the same ids - I need to assign different ids to these textboxes creeated in the loop so that I can retrieve...
7
by: mef526 | last post by:
I would like to reference a dynamically created control and I know the name. I would like to use the following: Dim strName as String = "txtControl1" ' This is the ".Name" used when textbox was...
3
by: DotNetNewbie | last post by:
I am reading the book Teach Yourself Microsoft Visual Basic .Net 2003 in 21 Days. I am having trouble getting one of the exercises to work at the end of day 4. Exercises: 1. Create a new...
0
by: MTurner | last post by:
Hey guys i'm having some problems creating a program, i have an MDI parent with child windows that are created dynamically (since there is no way for me to know how many are going to be created)...
4
by: Jeannot | last post by:
VS2008, VB, .NET 3.5 When I create a TextBox in Designer, then at runtime wherever I click, the caret is placed at the end of the text the box actually contains. But when I create a TextBox...
2
by: zimbu | last post by:
Hi all, I have created some textboxes dynamically by using var sun = document.createElement('input'); with button click. after some time I will re visit the fields, how do I retrive that...
1
by: semomaniz | last post by:
I have a form where i have created the form dynamically. First i manually added a panel control to the web page. Then i added another panel dynamically and inside this panel i created tables. I have...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.