473,385 Members | 1,337 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,385 software developers and data experts.

dynamic generated buttons

I heve this webform with a checkboxlist and a button.
Based on which checkboxes are checked, several textboxes and Buttons are
generated.

When I click one of these buttons, the page goes in postback, and everything
has disappeared from the form

All the help I can find is about a predefined amount of Generated user
controls in the pageLoad or Init, but that's not much of use in my particular
situation...

Anyone an Idea ?
Nov 19 '05 #1
5 1035
You have to recreate dynamically generated controls on every postback.

Eliyahu

"benoit" <be****@discussions.microsoft.com> wrote in message
news:A3**********************************@microsof t.com...
I heve this webform with a checkboxlist and a button.
Based on which checkboxes are checked, several textboxes and Buttons are
generated.

When I click one of these buttons, the page goes in postback, and everything has disappeared from the form

All the help I can find is about a predefined amount of Generated user
controls in the pageLoad or Init, but that's not much of use in my particular situation...

Anyone an Idea ?

Nov 19 '05 #2
Aye, you might find this (free) control somewhat handy:
http://www.denisbauer.com/ASPNETCont...aceholder.aspx

karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:em**************@TK2MSFTNGP10.phx.gbl...
You have to recreate dynamically generated controls on every postback.

Eliyahu

"benoit" <be****@discussions.microsoft.com> wrote in message
news:A3**********************************@microsof t.com...
I heve this webform with a checkboxlist and a button.
Based on which checkboxes are checked, several textboxes and Buttons are
generated.

When I click one of these buttons, the page goes in postback, and

everything
has disappeared from the form

All the help I can find is about a predefined amount of Generated user
controls in the pageLoad or Init, but that's not much of use in my

particular
situation...

Anyone an Idea ?


Nov 19 '05 #3
uhh....
and how would you retrieve the ones that are created ?
in a Session ?
or any alternative ...

"Eliyahu Goldin" wrote:
You have to recreate dynamically generated controls on every postback.

Eliyahu

"benoit" <be****@discussions.microsoft.com> wrote in message
news:A3**********************************@microsof t.com...
I heve this webform with a checkboxlist and a button.
Based on which checkboxes are checked, several textboxes and Buttons are
generated.

When I click one of these buttons, the page goes in postback, and

everything
has disappeared from the form

All the help I can find is about a predefined amount of Generated user
controls in the pageLoad or Init, but that's not much of use in my

particular
situation...

Anyone an Idea ?


Nov 19 '05 #4
When you dynamically add controls into the page it is up to you to recreate
them upon postback. The two places to do this is in Page_Init or CreateChildControls.
If you're doing this from a user control you can also do this from Page_Load.

The challenge is storing the necessary state information to remember what
controls to add.

-Brock
DevelopMentor
http://staff.develop.com/ballen
I heve this webform with a checkboxlist and a button.
Based on which checkboxes are checked, several textboxes and Buttons
are
generated.
When I click one of these buttons, the page goes in postback, and
everything has disappeared from the form

All the help I can find is about a predefined amount of Generated user
controls in the pageLoad or Init, but that's not much of use in my
particular situation...

Anyone an Idea ?


Nov 19 '05 #5
Difficult to say without knowing details. Anything between re-creating
following the same logic as for creating and pre-setting in design time.

Eliyahu

"benoit" <be****@discussions.microsoft.com> wrote in message
news:A4**********************************@microsof t.com...
uhh....
and how would you retrieve the ones that are created ?
in a Session ?
or any alternative ...

"Eliyahu Goldin" wrote:
You have to recreate dynamically generated controls on every postback.

Eliyahu

"benoit" <be****@discussions.microsoft.com> wrote in message
news:A3**********************************@microsof t.com...
I heve this webform with a checkboxlist and a button.
Based on which checkboxes are checked, several textboxes and Buttons are generated.

When I click one of these buttons, the page goes in postback, and

everything
has disappeared from the form

All the help I can find is about a predefined amount of Generated user
controls in the pageLoad or Init, but that's not much of use in my

particular
situation...

Anyone an Idea ?


Nov 19 '05 #6

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

Similar topics

6
by: Craig Keightley | last post by:
I have a page that has n number of radio groups (yes/No) how can i prevent the form being submitted if more than one radio group is not selected? By default all radio groups are unchecked ...
1
by: | last post by:
Hi Guys, I am generating dynamic server controls using XML and XSLT. With this I am generating two buttons which when clicked redirect the page to a different page. Here is my "checkout"...
1
by: Klom Dark | last post by:
I've got a weird problem going on - I've got a table of dynamically created buttons. Each button has the X/Y value of the buttons position in the table assigned to it's CommandArgument property and...
6
by: dhnriverside | last post by:
Hi peeps, I'm trying to create some controls textboxes at runtime, based on the number of items in a IETreeView that are checked. That I can do, I've got a place holder and I can create the...
2
by: Jörn von Holten | last post by:
Hi, my 3-tier system has a separate bizz-logic and storage service (MVC paradigm as usual) and the bizz-logic layer shall drive the logic (workflow) of the ASP site. My "idea" is (alike Xaml...
5
by: Gui | last post by:
Hi, I'm working in C# .net 2005 with Ajax. I have a page that loads dynamic user controls depending on the scenario. In those user controls, I create dynamic linkbuttons. The user controls are...
3
by: nmsreddi | last post by:
Hello Friends I am developing a windows application where in Formload i am creating 4 buttons at runtime dynamically(mandatory ,please dont suggest to have buttons at design time ) ,upto this it...
9
by: lilOlMe | last post by:
Hi there! I have generated a GridView that looks something like: SportName| CompanyNameX |CompanyNameY |CompanyNameZ Hockey.....| Shipping------------ |Accounting-------- |Shipping------------...
2
Frinavale
by: Frinavale | last post by:
I've created a ASP.NET control that displays a "book" of schedules. It dynamically displays scheduling times and allows the user to page through the schedules. It also lets the user edit the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.