This is a migrated thread and some comments may be shown as answers.

How to set up any control property by parameters stored in xml

1 Answer 25 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
tomas
Top achievements
Rank 1
tomas asked on 06 Feb 2009, 03:31 PM

Hello.

We are developing business rule engine. Users can create database structure, objects, web forms and so on. Now, we would like to provide the users with the ability to set up Telerik ASP.NET Ajax controls using xml set up files.
 
These files have the same structure like html code snippets used in VS.NET Designer for every type of your control.

The main reasons for that is:

1) we can easily create xml schema for "supported subset of features"
2) there are too many features to create special form for every property of the control
...

The question is How to interpret there xml files to set up controls.

1) With help of reflection. => We need to cast strings in xml attributes to proper types.
2) Use already existing functionality in VS.NET designer to read aspx files and set up controls on the fly.

What do you think about that? I know nothing about the second option. Can you help me, please?

Thank you very much.

Tom

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 09 Feb 2009, 03:40 PM
Hi tomas,

You may consider using user controls provided your xml files have the same structure as the ASPX page. You can load user controls from code using the LoadControl method of the Page object. You can also check the ParseControl method which would load an user control from a string.

Regards,
Albert
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
tomas
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or