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 4 of 4

Thread: Get current SkinId in aspx page

  1. #1
    yakatz is offline Member
    Join Date
    Jul 2008
    Location
    Could be anywhere between 60N-28N and 77W-36E
    Posts
    84

    Default Get current SkinId in aspx page

    I am creating a page which serves a pdf file based on the current skin, but it seems that no matter what skin I am viewing the store with (using ?skinid=#), the script always opens Skin_1
    C#/VB.NET Code:
    Customer ThisCustomer = ((AspDotNetStorefrontPrincipal)Context.User).ThisCustomer;
    String FileName "App_Templates/Skin_" ThisCustomer.SkinID.ToString() + "/printform.pdf"
    Any reason that should not work?
    Using ASPDotNetStoreFront since Version 3
    Got Version 9.
    Almost ready to deploy MultiStore (final testing stages for the new FirstData gateway)
    Finally upgraded our server to 2008 R2.

  2. #2
    yakatz is offline Member
    Join Date
    Jul 2008
    Location
    Could be anywhere between 60N-28N and 77W-36E
    Posts
    84

    Default

    I moved this to the ML forum to see if I have better luck getting a reply
    Using ASPDotNetStoreFront since Version 3
    Got Version 9.
    Almost ready to deploy MultiStore (final testing stages for the new FirstData gateway)
    Finally upgraded our server to 2008 R2.

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

    Default

    The page was inherited with what class, skinbase or?

    If you could do it like, public partial class YourCustomPage : SkinBase {}. Then, you can try to use just the SkinID:

    e.g.
    Code:
    String FileName = "App_Templates/Skin_" + SkinID.ToString() + "/printform.pdf";

  4. #4
    yakatz is offline Member
    Join Date
    Jul 2008
    Location
    Could be anywhere between 60N-28N and 77W-36E
    Posts
    84

    Thumbs up

    Quote Originally Posted by AspDotNetStorefront Staff - Alfred View Post
    The page was inherited with what class, skinbase or?

    If you could do it like, public partial class YourCustomPage : SkinBase {}. Then, you can try to use just the SkinID:

    e.g.
    Code:
    String FileName = "App_Templates/Skin_" + SkinID.ToString() + "/printform.pdf";
    Thanks, that works.
    It is strange, since I copied receipt.aspx.cs to make this.
    Using ASPDotNetStoreFront since Version 3
    Got Version 9.
    Almost ready to deploy MultiStore (final testing stages for the new FirstData gateway)
    Finally upgraded our server to 2008 R2.