dynamically creating asp.net controls

  • Thread starter Thread starter Andy B
  • Start date Start date
A

Andy B

I have a dataset table with control names and control types in it called
formControls. I need to know how you use the column values in the aspx
markup to actually create the controls on the page.
 
Hello Andy,

Could you explain in details what exactly you want to get?!

---
WBR,
Michael Nemtsev [Microsoft MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


AB> I have a dataset table with control names and control types in it
AB> called formControls. I need to know how you use the column values in
AB> the aspx markup to actually create the controls on the page.
AB>
 
Hi.

I have a wizard that will create some blank forms (legal forms) for clients
and customers. I need to make it to where the entire form is generated
through this wizard control. It will then be saved in an xml file for use
later. The form has place holders in it as mentioned in an erlier thread.
For an example, "{BandName} agrees to play on {EventDate} between
{Start'Time} and {EndTime}..." I think I have a way figured out for the
{PlaceHolder} tokens. Now my issues is trying to figure out how to create
and store the asp.net controls that fill in these placeholders and keep them
in the dataset/xml file so they don't get lost. I want to make it as easy as
possible for the user to create these controls. It should be in such a way
that the user doesn't even know they are creating asp.net controls (this
should be done in code automatically). I want to ask the user for a generic
control name I(i.e. "Enter the field name: <TextBox>"), a basic data type
(Text, a number, currency/money and so on and then just write these values
to a table in the dataset. When the wizard is used (another wizard to create
a form for the customer), the user is given a multistep form to fill out
(based off the xml file in the wizard we just talked about). When the form
is filled out, it creates another xml document (in memory stream) with the
controls values omitted since they probably wont be needed anymore (or I can
leave them just for ease sake). Either way, I think this should be a good
example of what I need. If there is more issues and you need more in order
to help, let me know...
 
Back
Top