Hi.. I have the following code - to display a message box. But the code runs on every postback displaying the message. How do I prevent this?
thanks again
thanks again
protected void btnPrintLabels_Click(object sender, EventArgs e)
{
RadAjaxManager1.ResponseScripts.Add(
@"Sys.Application.add_load(function()
{radalert('Under Construction...', 250, 100);})"
);
}
4 Answers, 1 is accepted
0
Hi Jon,
Adding the script into the ResponseScripts collection will cause showing the message on each ajax request by default and this is the expected behaviour. Could you please let me know what functionality you need to achieve and what is the behaviour you required?
Regards,
Maria Ilieva
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Adding the script into the ResponseScripts collection will cause showing the message on each ajax request by default and this is the expected behaviour. Could you please let me know what functionality you need to achieve and what is the behaviour you required?
Regards,
Maria Ilieva
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

Jon
Top achievements
Rank 1
answered on 19 Nov 2008, 12:45 PM
Hi..
Once the button is clicked and the message is displayed - I only wait the message to display if they click the button. Not on all other postbacks or ajax requests... I want the message JUST for clicking that button.
thanks again
Once the button is clicked and the message is displayed - I only wait the message to display if they click the button. Not on all other postbacks or ajax requests... I want the message JUST for clicking that button.
thanks again
0
Hello Jon,
Please find attached a sample project which represents your scenario and which works as expected. Test it on your side and let me know what the difference in your case is.
Sincerely yours,
Maria Ilieva
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Please find attached a sample project which represents your scenario and which works as expected. Test it on your side and let me know what the difference in your case is.
Sincerely yours,
Maria Ilieva
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

Jon
Top achievements
Rank 1
answered on 19 Nov 2008, 03:01 PM
Thanks.. I see what you did.