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

How to Alert Dialog from Server

1 Answer 72 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dave
Top achievements
Rank 1
Dave asked on 19 Aug 2010, 08:32 AM
Hi,

I'm just learning the controls and I've searched the forums and documentation and examples, but don't seem to find my answer.  I'm sure that I'm just overlooking the answer.

I would simply like to report server side errors back to the client.  i.e if a user presses a button that causes a postback to the server, and the server code catches an exception I'd like to notify the user like this:

try
{
   MyBusinessLogicCall();
}
catch(Exception ex)
{
   ???  icon = ErrorIcon;
   string Title = "An unexpected error has occured";
   string messageText = ex.message;
     
   // Call some api function to display error info to the user
   // Something like the windows MessageBox...  Probably RadAlert???
   // But how do I invoke this from the Server Code??
   MessageBox.Show(Title, messageText, icon);
  
     
}

Any help would be appreciated!

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 19 Aug 2010, 11:01 AM
Hi Dave,

The RadWindowManager's radalert dialog is intended to be a replacement for the window.alert() popup. Just like the browser's standard popup, it can be created and handled on the client only. This being said, if you implement the desired logic by using standard alert popup, the same approach will work with radalert as well (this blog post will be of help in such case).

Best wishes,
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
General Discussions
Asked by
Dave
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or