Total Pageviews

2 Aug 2013

ManagedLink Attribute for Web Part Properties that Converts Absolute URLs to Relative Ones

[ManagedLink] above the web part property automatically converts full Urls to relative ones. very useful for fool proofing against incorrectly typed URL's.
For example, http://portal/Lists/CustomList/Forms/Display.asxp becomes l/Lists/CustomList/Forms/Display.asxp

C# example:
        WebDisplayName("Friendly Display Name"),
        WebDescription("Values: Whatever value you need")]

        public Uri URI { get; set; }

No comments:

Post a Comment