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

executing severside code only after entering value in radprompt

1 Answer 123 Views
Getting started with ASP.NET
This is a migrated thread and some comments may be shown as answers.
Arjun
Top achievements
Rank 1
Arjun asked on 28 Jul 2011, 11:19 AM
Hi,

Somebody help me please.I am stuck with this.
<script type="text/javascript">
        function openPrompt() {
            radprompt("please enter the file name", CallBackFn);
          
        }
        function CallBackFn(arg) {
            document.getElementById("<%=hdnField1.ClientID%>").value = arg;
        }
        
    </script>
I have specified onClientClick="openPrompt()" in the button control.But this directly executes the serverside code.but it should execute server side code only after i enter the file name and click ok.please help.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 29 Jul 2011, 01:07 PM
Hello Arjun,

In this case I would advise that you add the return false; statement to the OnClientClick handler to cancel the postback and then manually call the postback in the RadPrompt's callback function. This approach is shown in this post of one of the code libraries: http://www.telerik.com/community/code-library/aspnet-ajax/window/block-the-execution-thread-with-radconfirm.aspx#1701380.


Best wishes,
Marin
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Getting started with ASP.NET
Asked by
Arjun
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or