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

3 posts, 0 answers
  1. Acadia
    Acadia avatar
    204 posts
    Member since:
    May 2005

    Posted 01 Apr 2009 Link to this post

    I can't seem to find this in the help but perhaps I overlooked it.

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

    Thanks
  2. Acadia
    Acadia avatar
    204 posts
    Member since:
    May 2005

    Posted 01 Apr 2009 Link to this post

    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

  3. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 01 Apr 2009 Link to this post

    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.
Back to Top