Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Dynamically copy and create html table

Posted on 2010-11-21
5
Medium Priority
?
772 Views
Last Modified: 2012-05-10
Hi

I have a small table within a CollapsiblePanelExtender.  It has two dropdowns and a few textboxes.

When a user clicks a button, I would like to copy this table and controls and then place the copy underneath the current table.

How would I do this?

Thanks
0
Comment
Question by:Sheritlw
  • 2
  • 2
5 Comments
 
LVL 7

Expert Comment

by:meispisces
ID: 34186794
Please explain in detail. What do you mean by "copy"?
0
 
LVL 11

Expert Comment

by:madgino
ID: 34188589
Beside copying the content the question is how would you use the new section as if you want to post the data the controls will have to have different id's for the dropdowns and comboboxes.

So I think the solution is not to 'copy' the content but to manually construct it using html code and new controls.
Here's an example on how to add controls to a panel:
http://www.experts-exchange.com/Programming/Languages/C_Sharp/Q_22765581.html
0
 

Author Comment

by:Sheritlw
ID: 34190857

Since I have given up on the gridview and users will only add 1-4 records, I created a table with the fields I need and thought I would copy the format etc from the existing table and append a number ie. id = txtDescribe & "1"
I'm sure I can figure out how to recreate the table, but how do I place it below the other table?
The table is in a panel, so there should be a way to add the table below the one being copied.
Thanks
0
 
LVL 11

Accepted Solution

by:
madgino earned 2000 total points
ID: 34200784
You should create an user control with your table and fields and dynamically add it to the page.
Here are some helpfull links:
http://www.codeproject.com/KB/user-controls/DynamicUC.aspx
http://www.4guysfromrolla.com/articles/092904-1.aspx
0
 

Author Closing Comment

by:Sheritlw
ID: 34202827
That is a good idea
Thanks
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question