Copied to clipboard

Flag this post as spam?

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


  • Sonja 132 posts 620 karma points
    Oct 08, 2018 @ 07:01
    Sonja
    0

    Too many characters in character literal

    Hi

    I'm trying to use UmbClientMgr.openModalWindow and I'm having problem:

    <button class="stackedContent default" href="@item.Url" title="@item.Title" id="TestBtn" onclick="@UmbClientMgr.openModalWindow('mypage.aspx', 'some title', true, 800, 600);">
    

    I'm getting Compiler Error Message: CS1012: Too many characters in character literal

    please advise

  • Chriztian Steinmeier 2726 posts 8320 karma points MVP 4x admin c-trib
    Oct 08, 2018 @ 07:12
    Chriztian Steinmeier
    101

    Hi Sonja,

    This is a C# syntax thing that gets me a lot too - it's because in C# the single quote character is used to denote a single character. So you need to change the <button> tag and use double quotes instead (yes, even though you're already inside a pair of double quotes) - e.g.:

    <button class="stackedContent default" href="@item.Url" title="@item.Title" id="TestBtn" onclick="@UmbClientMgr.openModalWindow("mypage.aspx", "some title", true, 800, 600);">
    

    Hope that helps,

    /Chriztian

  • Sonja 132 posts 620 karma points
    Oct 08, 2018 @ 07:17
    Sonja
    0

    Thanks Chriztian this solved this problem. For the new problems I'll go in new thread

  • 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