Im creating my own “CMS” in asp.net, I get the page content from the database and then create custom image objects and html content.
For example, I have one method called GetPageInformation(string pageName) and it returns a Dictionary of name value pairs, but I want it to return 3 image objects, and 1 string text (with html markup)… is that possible?
Or how can convert this database string value into objects?
(image path ; alt text ; link)
"~/img/home/homeimage.jpg;my alternate text;my href link"
field separator: ';'
registry separator: '|'
Then I fill one object, just for example:
string[] images = myDBstring.Split('|');
PageImage.Path = images[0].Split(';')[0];
PageImage.AlternateText = images[0].Split(';')[1];
PageImage.LinkUrl = images[0].Split(';')[2];
//...
//PageImage derives from System.Web.UI.WebControls.Image
Sorry for my bad english… thanks!
You may always return array of objects
object[]or dictionary, ie.Dictionary<string, object>. However, I guess it would be better to create classes that meet your needs – ie a class that contains string with html content and array of images.