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
3 1702 Frinavale 9,735
Recognized Expert Moderator Expert
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
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
Sign in to post your reply or Sign up for a free account.
Similar topics |
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 TextBox();
Button doSomeAction = new Button();
doSomeAction.Click += new EventHandler(doSomeAction_Click);
|
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 many forms of that type are
active in memory. But in order for this to work, I need to be able to
decrement the counter when a subform is closed using the subform's x control.
I'm sure this is frequently done, so I am interested to learn how...
|
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 a WebForm with some textboxes, dropdownlists, a panel,
imagebutton and so on. When I click on the image button (which was
created at design time) I dynamically build a table. In each of row of
that new table I put several cells and one cell...
|
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 their
corrs values. Anybody??
Code snippet:
<%
int y = 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 dynamically created
dim c as control = me.Controls(strName)
Instead I have to do this:
| |
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 multiple-form application that displays two forms when it
starts, each
with a text box. Add code to each text box’s TextChanged event (this is the
|
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) however i need to be able to access each one individually after they are created.
i've given them names using this
childForms(childForm).Name = "SearchForm" & childNumber
however i'm unsure how i can dynamically access these forms. so that...
|
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 dynamically, the caret stays wherever I
clicked, int he middle of nowhere.
Is this a property that defaults different in Designer or at runtime,
or is it a bug?
My code:
|
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 element's Id or name onblur event.
Bythe following code I used to get the value of the specified element, but I want id or name of that element .
|
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 set text boxes and labels inside the table rows. I then added a button. All of these are done through code.
The problem that i am having is i can get the value from a text box with resides inside the first panel (out side of panel that is...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |