469,648 Members | 1,695 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,648 developers. It's quick & easy.

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 1400
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**************@tk2msftngp13.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*********@hotmail.com> 在郵件
news:e7*************@TK2MSFTNGP11.phx.gbl 中撰寫...
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**************@tk2msftngp13.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 "Dynamically 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*************@TK2MSFTNGP11.phx.gbl...
Can you provide some sample code for me as I am a beginner of ASP.NET
"adnan boz" <ab*********@hotmail.com> 在郵件
news:e7*************@TK2MSFTNGP11.phx.gbl 中撰寫...
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**************@tk2msftngp13.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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Nathan Bloomfield | last post: by
1 post views Thread by Will | last post: by
3 posts views Thread by Tyler Carver | last post: by
3 posts views Thread by WebBuilder451 | last post: by
9 posts views Thread by Tarscher | last post: by
reply views Thread by Eniac | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.