Need sample for dynamic editing

W

Wardeaux

All,
looking for sample project on how to add/edit/delete controls from an aspx
page at runtime... any pointers is most appreciated!!
My controls are simple: Label, Textbox, and DropList... I only want a
handful of custom properties to be set for the control...

MMTIA
wardeaux
 
B

Bliss

You need to first add a container to your aspx like the webcontrol
table.
Once you have that you can add webcontrols to the table dynamically
from the code behind.

Table.Controls.Add(new control);
 
W

Wardeaux

Bliss,
thanks for the reply... after looking at my original post, I see I didn't
include enough information... :( I need an web interface for the USER to be
able to design and layout controls at runtime.... I know there are several
HTML editors, I need something with a little more control over appearance,
properties and functionality...
know of anything like THAT?? :)
Thanks again for the input....
wardeaux
 
B

Bliss

Hey man,

sounds to me like you are talking about somthing I just did at work. I
needed to set up a web page that would allow the user to describe how
they want a control to be rendered to the screen.

Example:
Take a simple survey application. When a user defines how the want the
questions to show up on the page etc... In the survey set up the pick
how they want it to be laid out and what controls to use for each
qestion. etc...

If that is what you are thinking about this is what I did. I set up
some tables that will hold all the information that I want to
dynamically build at runtime. The records in these tables are created
through a web form that the user fills out describing how they want
each question to look. For instance they would say I want this
question to use radio buttons and this question to use check boxs.
This is all stored in the data base so I can use it later when they
need to be rendered to the screen in the form of a survey question.

Not sure if this is what you want but if so let me know I would be
happy to tell you more about what I did.

Thanks,
B
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top