Dynamic Properties

  • Thread starter Thread starter James Doughty
  • Start date Start date
J

James Doughty

Hello everyone,

I'm working on an app that is involed in creating dynamic control. I would
to have a property stored in the database to use to retrieve the value
from the screen. The problem is for a texbox I want to use .text and a
dropdownlist I want to use .selecedvalue, ect. I would prefer not to do a
typeof is textbox since I want the ability to add controls to database and
have them avaiblable without having to recompile. I also have the visible
and a couple of other attributes I want to do similar to this.

Andy idea?
Thanks,
James Doughty
 
Hi James,

The easiest way I can think of is the typeof way you suggested. I think if
you are having a limited number control type, I think it is not a bad idea.
You may want to create a helper class to set these attributes if you want to
do it once. This is the method I used, not sure if it is nice enough for
your case.

Regards,
Jack Li
MVP (ASP.NET)
 

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

Back
Top