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

Is there a telerik equivalent for MsgBox

1 Answer 91 Views
Window
This is a migrated thread and some comments may be shown as answers.
Aash
Top achievements
Rank 1
Aash asked on 08 Oct 2010, 09:40 AM
Hi,

Let me explain my scenario, here is a sample code of what im trying to do:

Dim aaa As String = "aaa"

Telerik.Web.UI. RadAjaxManager.GetCurrent(page).ResponseScripts.Add("radconfirm('are you sure?', null, 300, 150, null, 'are you sure?');")

Dim ccc As String = "ccc"

If I used a MsgBox the execution would be blocked, until the user responds to the prompt and then it will perform Dim ccc As String = "ccc" . However with a rad-anything , the server side code executes fully and then the radconfirm appears. Is there a way to make the radconfirm appear in the middle of server side code execution, like a MsgBox ?

Many Thanks,
Aash.

 

 

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 11 Oct 2010, 12:01 PM
Hello Aash,

Basically, VB.NET's MsgBox is executed on the server only - the message will not be visible on the client machines. For this purpose you should use either standard confirm, or you could use radconfirm.
In both cases however, you should keep in mind that just as the standard confirm dialog, radconfirm is created and handled on the client only - you will have to output the JS code that would call the corresponding function. More information on how to call JavaScript code from server-side functions is available in various locations on the net. For example you could check this blog post.
Please also note that once you receive the argument from the radconfirm dialog on the client(it is returned in the CallbackFunction), it must be sent to the server after that. This (sending arguments from the client to the server with JavaScript) is a general programming task - for example you can use __doPostBack() or RadAjax's ajaxRequest call to do this.

You may also find the following Code Library article helpful - it was submitted by a customer of ours:
http://www.telerik.com/community/code-library/aspnet-ajax/window/server-side-msgbox-user-control-for-radconfirm-radalert-and-radprompt.aspx

Regards,
Georgi Tunev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Window
Asked by
Aash
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or