How do we can use C# inline web part container

Ryan Nguyen asked on December 5, 2018 11:55

Can we write C# inline with web part container layout like web part, transformation? I tried this but got error for MacroResolver {%# System.Web.HttpUtility.ParseQueryString(new System.Uri("ex.com?v=1").Query).Get("v") %}

Recent Answers


Dragoljub Ilic answered on December 5, 2018 12:21 (last edited on December 10, 2019 02:31)

Hi Chu,

It looks like you are trying to use ASCX code in Text/XML transformation. You should try something like this to get query string in container: {% v %} or {% QueryString.v |(identity)GlobalAdministrator%}

Best regards, Dragoljub

0 votesVote for this answer Mark as a Correct answer

Ryan Nguyen answered on December 6, 2018 02:20

Yes. Thanks for your answer @Dragoljub Ilic. I resolved this by make a custom macro method.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.