Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm hoping someone can help me improve my current solution to a problem I'm having. I have a document type 'Product' - I've made three pages using this document type, lets call these page 1, page 2 and page 3. No matter what page of the three is requested it will always pass through the controller action below, depending on the page requested I must show different records.
See below for my current simplified solution.
public class ProductController : RenderMvcController
public override ActionResult Index(RenderModel model)
if (model.Content.Id == page1Id)
public static int page1Id= 999;
public static int page2Id= 888;
public static int pag3Id= 777;
The problem is if the page Id's ever change then the whole system is going to fall down, likewise I don't really like comparing on the content name for the reason stated above - I'm trying to make this section as adaptive as possible.
If anyone has any suggestions that would be great.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted