This is a migrated thread and some comments may be shown as answers.

[Solved] Show radprompt on click

1 Answer 169 Views
Window
This is a migrated thread and some comments may be shown as answers.
Ivy
Top achievements
Rank 1
Ivy asked on 12 Mar 2013, 02:30 AM
Hi,

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

Thanks,
Ivy.

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 12 Mar 2013, 04:18 AM
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.
Tags
Window
Asked by
Ivy
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or