Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 3 of 3

Thread: Do Skin ID's Have To Be Numeric?

  1. #1
    defree99 is offline Junior Member
    Join Date
    Oct 2010
    Posts
    0

    Default Do Skin ID's Have To Be Numeric?

    We are planning to use multiple skins in our ML 8.0.1.2 install.

    Instead of www.websitename.com?skinid=2

    Can skin ID's be descriptive?

    Like www.websitename.com?skinid=winter

    or www.websitename.com?skinid=21pfx

  2. #2
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    I'm afraid that's not possible out of the box. SkinID is an integer you can't obviously use an alphanumeric unless you'll modify the source.

  3. #3
    webopius is offline Senior Member
    Join Date
    Nov 2008
    Location
    London, UK
    Posts
    440

    Default

    Hi

    If you created a lookup table of skin names to values, e.g.

    spring 1
    summer 2
    autumn (or fall!) 3
    winter 4

    Then you might be able to modify App_Code\SkinBase.cs (at about line 402 in V9) to retrieve the skin name from the URL, lookup the ID of the skin and then apply the skin.

    Something like this to replace the existing code:

    String m_SkinName = CommonLogic.QueryStringCanBeDangerousContent("skin id");
    if (m_SkinName != "")
    {
    m_SkinID = LookupSkinID(m_SkinName);
    }

    [You'd obviously have to write the LookupSkinID method.]

    If you wanted to take the simple route, you could simply have a switch statement to lookup the skin names and return an id rather than go to the trouble of creating a database table and access/editing routines.

    Adam
    Last edited by webopius; 11-04-2010 at 02:11 PM. Reason: Fix my terrible typing