Show radprompt on click

2 posts, 1 answers
  1. Ivy
    Ivy avatar
    30 posts
    Member since:
    Feb 2013

    Posted 11 Mar 2013 Link to this post

    Hi,

    I want to know how to display a Radprompt on button click. Please help with sample code.

    Thanks,
    Ivy.
  2. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 11 Mar 2013 Link to this post

    Hello Ivy,

    In order to use this dialog you need to have a RadWindowManager on the page. The minimum required to show a RadPrompt is the content string and a callback function. Please have a look into the following code.

    ASPX:
    <button onclick="radprompt('What is your Name?', promptCallBackFn); return false;">
        Display Prompt Box</button>

    JavaScript:
    <script type="text/javascript">
        function promptCallBackFn(arg)
        {
            alert("The name you entered is : " + arg);
        }
    </script>

    If you want to display the RadPrompt from code behind, you can try the following code.

    C#:
    RadWindowManager1.RadPrompt("What is your Name?", "promptCallBackFn", 350, 100, null, "Enter Name", "42");

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top