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

Problem with AlertPrompt() codebhind

3 Answers 29 Views
Window
This is a migrated thread and some comments may be shown as answers.
German
Top achievements
Rank 1
German asked on 11 Aug 2009, 02:19 PM

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.

 

3 Answers, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 11 Aug 2009, 02:26 PM
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.
0
German
Top achievements
Rank 1
answered on 11 Aug 2009, 02:30 PM
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
0
Georgi Tunev
Telerik team
answered on 12 Aug 2009, 11:09 AM
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.
Tags
Window
Asked by
German
Top achievements
Rank 1
Answers by
Fiko
Telerik team
German
Top achievements
Rank 1
Georgi Tunev
Telerik team
Share this question
or