Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Pradeep 39 posts 158 karma points
    Jul 03, 2015 @ 16:31
    Pradeep
    0

    Simple Usercontrol Help

    Hello,

    I have a problem that how I able to write the following in aspx webform..

    Razor

    <input id="myname" text="@CurrentPage.NiceUrl" />
    

    Web form

    <asp:Label ID="label2" runat="server" Text=" ? " ></asp:Label>
    

    Please help me , I tried a lot method but they are not working , how I get current url in label2 , and a lot other parameter as we pass in razor ..

    Thanks Waiting for reply

  • Ismail Mayat 4511 posts 10059 karma points MVP 2x admin c-trib
    Jul 03, 2015 @ 16:49
    Ismail Mayat
    0

    Pradeep,

    You can try and set it in the codebehind for the usercontrol using content service see https://our.umbraco.org/forum/developers/api-questions/60505-Umbraco-7-plus-nodefactory although how you get the current node your on im not 100%

    Regards

    Ismail

  • Pradeep 39 posts 158 karma points
    Jul 05, 2015 @ 22:13
    Pradeep
    100

    Hello everyone,

    I found the solution and I am posting video link so its helpful for someone else ..

    However the asp:label not working proper with umbraco tag i.e. = [#pageName]

    We always need a macro to run the tags...

    So I create a public property and pass them using following video and working now , .....

    http://umbraco.com/help-and-support/video-tutorials/introduction-to-umbraco/developer-introduction/macro-parameters/TVPlayer

    Thanks -Pk

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies