Problem with AlertPrompt() codebhind

4 posts, 0 answers
  1. German
    German  avatar
    26 posts
    Member since:
    Jun 2009

    Posted 11 Aug 2009 Link to this post

    I'm having a problem displaying my Radprompt through codebhind.
    I simply have the code in an asp:button inside an UpdatePanel.
    The alertprompt does not display and on the corner left bottom of the screen
    I recieve a script error. I'm using the following code in the codebehind:

     

    Dim

     

    radalertscript As String = "<script language='javascript'>function f(){radalert('TEXT', 200, 200, 'Title'); Sys.Application.remove_load(f);}; Sys.Application.add_load(f);</script>"

     

     

     

    Page.ClientScript.RegisterStartupScript(Me.[GetType](), "radalert", radalertscript)


    thanks a bunch.

     

  2. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 11 Aug 2009 Link to this post

    Hello German ,

    I believe that this KB will be of help.

    All the best,
    Fiko
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. German
    German  avatar
    26 posts
    Member since:
    Jun 2009

    Posted 11 Aug 2009 Link to this post

    Thank you for your reply. That's the page I was referencing earlier
    and I still recieve the same error and no display. However, When I place
    the javascript in the aspx page the prompt displays as expected. But,
    when I place the javascript through codebehind in the aspx.vb page,
    I receive nothing. Is it because it's inside an UpdatePanel? If so,
    Is there any way to display the Alert() inside the UpdatePanel similar
    to the way I'm trying to achieve this
  4. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 12 Aug 2009 Link to this post

    Hi German ,

    Outputting JavaScript from server is relatively easy task, however, how you will get it to work strongly depends on the exact scenario that you are trying to implement. I would suggest to check this blog post for more information on the subject and if you still experience problems - to open a support ticket and to send us a sample project that shows your setup and the problem itself. This way we will have a better view over your case and we will provide you with the most appropriate solution.


    Kind regards,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top