OK this has already been done in Jscript and works fine, but I have been asked to re-develop the website using asp.net in Visual Studio.
What I have is a page that has a header area and in the content area, I have 17 modules that the company provides as services.
Each module has 6 elements to it each with a different value, and I’m thinking of using Lists, and I’m unsure if it’s the right way.
Each Module has 6 elements for example
Module Image (This is a jpg that represents the module)
Header Image (This is a large header image associated with the module)
Module Title in text
Module description in text
Button text
Module Colour (branding)
And there are 17 of these, so that chunk above needs to be duplicated 17 times
So once all the Modules have been created I’m thinking they then all loop out onto the page and will look and work like in the link below
What happens is that you can click on the module and the header image changes with parts of the list created above.
I’m not sure mind but have made a very basic start and was looking for some guidance.
ModulesBuilder.cs
namespace CristalStandards.Models
{
public class ModulesBuilder
{
public List<Modules> AvailableModules { get; set; }
}
public class Modules
{
public string ModuleImage { get; set; }
public string HeaderImage { get; set; }
public string ModuleTitle { get; set; }
public string ModuleDescription { get; set; }
public string ButtonText { get; set; }
public string ModuleColour { get; set; }
}
}
Right so I have the above, BUT what I’m unsure of is where do I create the 17 individual Modules with their 6 string elements that will be used on the page. I’m probably on the wrong path, but I’m a bit stuck.
It’s not right as I’m getting the red squiggly line on BrandCheckModule() and the image path, but if it helps this is how it looks in my head
namespace CristalStandards.Models
{
public class ModulesBuilder
{
public List<Modules> AvailableModules { get; set; }
}
public class Modules
{
public string ModuleImage { get; set; }
public string HeaderImage { get; set; }
public string ModuleTitle { get; set; }
public string ModuleDescription { get; set; }
public string ButtonText { get; set; }
public string ModuleColour { get; set; }
}
public static void BrandCheckModule()
{
Modules ModuleImage = "~/Images/ModuleIcons/brandcheckmoduleimage.jpg";
...
}
public static void StandardsCheckModule()
{
Modules ModuleImage = "~/Images/ModuleIcons/standardscheckmoduleimage.jpg";
...
}
}