473,770 Members | 4,029 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

dynamic create controls

I know i can use placeholder control for dynamic create controls. but my
requirement is i need to create multiple controls. when the user click the
button, one textbox will be created. If user click three times, there will
be three textbox created. However, just only one textbox was created
whatever times I click.
PLs help.

Million thanks

Nov 18 '05 #1
3 1528
Hi,
You have to recall your create method,
for every previously created textbox on every postback.
And manage states.

Good Luck
Adnan

"Grey" <er*******@i-cable.com> wrote in message
news:ex******** ******@tk2msftn gp13.phx.gbl...
I know i can use placeholder control for dynamic create controls. but my
requirement is i need to create multiple controls. when the user click the
button, one textbox will be created. If user click three times, there will
be three textbox created. However, just only one textbox was created
whatever times I click.
PLs help.

Million thanks

Nov 18 '05 #2
Can you provide some sample code for me as I am a beginner of ASP.NET
"adnan boz" <ab*********@ho tmail.com> ¦b¶l¥ó
news:e7******** *****@TK2MSFTNG P11.phx.gbl ¤¤¼¶¼g...
Hi,
You have to recall your create method,
for every previously created textbox on every postback.
And manage states.

Good Luck
Adnan

"Grey" <er*******@i-cable.com> wrote in message
news:ex******** ******@tk2msftn gp13.phx.gbl...
I know i can use placeholder control for dynamic create controls. but my
requirement is i need to create multiple controls. when the user click the button, one textbox will be created. If user click three times, there will be three textbox created. However, just only one textbox was created
whatever times I click.
PLs help.

Million thanks


Nov 18 '05 #3
Hi,
Sorry, but i don't have currently any samples.
But, you can search on MSDN Knowledge Base about "Dynamicall y Create
Controls in ASP.NET ..." (PSS ID Number: 317794 for c# or 317515 for VB
(6/25/2003)).
Or,
If your buttons will shown in a list format,
you could use the DataList or DataGrid control and add a TemplateColumn with
a button in it.
And, adding a new DataRow would be enough to create a new button.
Same as, adding dynamic buttons, but limited on positions.

Good Luck
Adnan
"Grey" <er*******@i-cable.com> wrote in message
news:eb******** *****@TK2MSFTNG P11.phx.gbl...
Can you provide some sample code for me as I am a beginner of ASP.NET
"adnan boz" <ab*********@ho tmail.com> ¦b¶l¥ó
news:e7******** *****@TK2MSFTNG P11.phx.gbl ¤¤¼¶¼g...
Hi,
You have to recall your create method,
for every previously created textbox on every postback.
And manage states.

Good Luck
Adnan

"Grey" <er*******@i-cable.com> wrote in message
news:ex******** ******@tk2msftn gp13.phx.gbl...
I know i can use placeholder control for dynamic create controls. but my requirement is i need to create multiple controls. when the user click the button, one textbox will be created. If user click three times, there will be three textbox created. However, just only one textbox was created
whatever times I click.
PLs help.

Million thanks



Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
17673
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to Create a Dynamic Crosstab Report PRODUCT :Microsoft Access PROD/VER:1.00 1.10 OPER/SYS:WINDOWS
1
6323
by: Will | last post by:
Hi all. I'm learning VB.Net and am developing a WinForms app. I'm trying to make an app that I will use to scan in one or more than on image. I want to use a tabbed interface to hold each image. Here's the code I'm using for testing purposes. I've got the code in the form's load event, but I think I'd have the same problems no matter where the code existed. Right now, the form has an empty tab control, everthing else is dynamic. <code>
2
5320
by: theComputer7 | last post by:
I cut down the code to make this half way understandable... I have read Data Grid girls caution about over use of dynamic controls. I truly believe what I am doing requires dynamically inserted user controls. Worse I'm trying to add dynamic user controls from within a repeater loop (looping through attributes)... I bind to a function in the code behind and pass in the attribute. <asp:repeater id="rAttributes" Runat="server">
3
1811
by: Tyler Carver | last post by:
I am trying to use some dynamic controls that are built and then added to tables. The problem that I am having is the timing of when I can populate the controls and have the state remain after a postback. The main question would be this: Why does this work for maintaining state after a postback for dynamic controls: myText = new Label(); myText.ID = "myText";
3
1863
by: WebBuilder451 | last post by:
I have a series of dynamic link buttons created based upon a datareader. I've added a click event and it calls the sub ok: example: "while loop through the reader" Dim ltrCtrl As New LiteralControl Dim lbtnCtrl As New LinkButton ltrCtrl.Text = "<br>" lbtnCtrl.Text = "WE: " & dtrCal(10).ToString lbtnCtrl.ToolTip = dtrCal(10).ToString & " these events" & dtrCal(1) lbtnCtrl.ID = "wecc" & i.ToString
9
3628
by: Tarscher | last post by:
hi all, I have this seemingly simple problem. I have lost a lot of time on it though. When a user selects a value from a dropdownlist (static control) a dynamic control is generated. I have to create the dynamic controls in the OnInit stage of the lifecycle. Since data from static controls is not yet available in the OnInit stage I can't know what dynamic control I have to create.
0
5293
by: Eniac | last post by:
Hi, I've been working on a custom user control that needs to be modified and the validation is causing me headaches. The control used to generate a table of 4 rows x 7 columns to display all the days in the week with dates and textboxes to fill in some data. row 1: question
1
4659
by: MaryamSh | last post by:
Hi, I am creating a Dynamic Search in my application. I create a user control and in Page_load event I create a dynamic dropdownlist and 2 dynamic button (Add,Remove) By pressing Add button ,another row will be created with the same control (I mean another dropdown and 2 button) and so on. and by pressing Remove button the selecetd row will be removed. I used viewstate to keep my value for postback, I want by changing selectedvalue of...
0
3501
by: MaryamSh | last post by:
Create Dynamic Dropdownlist Controls and related event -------------------------------------------------------------------------------- Hi, I am creating a Dynamic Search in my application. I create a user control and in Page_load event I create a dynamic dropdownlist and 2 dynamic button (Add,Remove) By pressing Add button ,another row will be created with the same control (I mean another dropdown and 2 button) and so on. and by...
2
5035
by: englishman69 | last post by:
Hello, I have been banging my head against this one for a while... Searches online have revealed many different proposals for correcting my issue but none that I can follow! My basic situation is this, I have a page which uses multiple postbacks to generate a list of dynamic text boxes with appropriate labels. However, when I do the final postback to enter the values in the dynamic textboxes into the database the values seem to become...
0
9602
marktang
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...
0
10237
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10071
jinu1996
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...
1
10017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9882
tracyyun
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...
0
8905
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7431
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5467
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3987
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.