Copied to clipboard

Flag this post as spam?

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


  • Sonja 133 posts 621 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 2798 posts 8788 karma points MVP 8x 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 133 posts 621 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

Please Sign in or register to post replies

Write your reply to:

Draft