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

[Solved] Is it possible to open a simple radalert window from serverside (vb.net)?

2 Answers 201 Views
Window
This is a migrated thread and some comments may be shown as answers.
Acadia
Top achievements
Rank 1
Iron
Acadia asked on 01 Apr 2009, 03:17 PM
I can't seem to find this in the help but perhaps I overlooked it.

******************************************************
DISREGARD I think i figured it out.
******************************************************

Thanks

2 Answers, 1 is accepted

Sort by
0
Acadia
Top achievements
Rank 1
Iron
answered on 01 Apr 2009, 08:12 PM

Looks like I didn't solve this issue afterall.  I tried the following and I keep getting an error in some code I don't recognize (Javascript) saying it is undefined.

All I want is to open a very simple radalert from vb.net with a statement and an ok button on it.

I tried this:

 

 

Dim scriptstring As String = "radalert('The login information is incorrect. Please try again.', 330, 210);"

 

ScriptManager.RegisterStartupScript(

Me, Me.[GetType](), "radalert", scriptstring, True)

I have a radwindowmanager and a radscriptmanager on my page.  The code is hit, but then I get:
Microsoft JScript runtime error: 'undefined' is null or not an object

Nad the error is thrown in the following section of code with the bold line highlighted:

 

/* START Telerik.Web.UI.Window.RadWindowManager.js */

Type.registerNamespace("Telerik.Web.UI");

Type.registerNamespace("Telerik.Web.UI.WindowManager");

function GetRadWindowManager(){

return Telerik.Web.UI.WindowManager.Manager;

}

window.radalert=function(_1,_2,_3,_4){

var _5=GetRadWindowManager();

var _6=_5._getStandardPopup("alert",_1);

if(typeof (_4)!="undefined"){

_6.set_title(_4);

}

 

I don't understand why opening up a simple alert window is so difficult.  It's easy to do client-side, but serverside seems overly complex and prone to issues in my opinion.  Would it be possible for Telerik to rethink this model and add a simple method fr very basic scenarios where the developer can simply type:

radalert.open('This is a simple rad alert', 200, 100)

What am I doing wrong here???

Thanks

0
Georgi Tunev
Telerik team
answered on 02 Apr 2009, 04:35 AM
Hello Acadia,

I believe that the following KB article will be of help (make sure that you have a RadWindowManager declared on the page from which you are calling the alert):
http://www.telerik.com/support/kb/aspnet-ajax/window/calling-radalert-from-codebehind.aspx

You could also check this Code LIbrary, that was sent from 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

As for the radalert logic itself, please note that radalert is intended to replace the browser alert dialog and just like it, radalert is called and handled on the client. Basically, if your scenario is working fine with a standard alert, it will work with radalert as well.


Greetings,
Georgi Tunev
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Window
Asked by
Acadia
Top achievements
Rank 1
Iron
Answers by
Acadia
Top achievements
Rank 1
Iron
Georgi Tunev
Telerik team
Share this question
or