Hi,
RadAjaxManager.GetCurrent(Me.Page).Alert("Please enter all mandatory fields")
This line throws a blank page and it shows the parameter values in URL. How can i restrict this and avoid the blank page?
please help me on this.
thanks,
ArunPrasad
5 Answers, 1 is accepted
Hello,
One suggestion is calling radlalert from code behind which allows additional parameters like dialog width and height and a title alert.
C#. Add RadWindowManager on the page and the following code when you need to show an alert from the server-side:
You can checkout this article for more information on this matter:
https://docs.telerik.com/devtools/aspnet-ajax/controls/window/how-to/using-radconfirm-in-server-code
For example:
string radalertscript = "<script language='javascript'>function f(){radalert('Some custom alert message!', 330, 210,'My Title'); Sys.Application.remove_load(f);}; Sys.Application.add_load(f);</script>";
Page.ClientScript.RegisterStartupScript(this.GetType(), "radalert", radalertscript);
Regards,
Vessy
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.


Hi Vessy,
Please ignore my previous post.
I used window.history.back(); to avoid the blank page restriction. It redirects to the same page after the alert popup. Now everything is fine. Thank you for your response Vessy.
Thanks,
ArunPrasad

Please ignore my previous post. (Don't know how to delete the post that wrongly posted)
I used window.history.back(); to avoid the blank page redirection. The above code is redirects to the same page after the alert popup. Now everything is fine. Thank you for your response Vessy.
Thanks,
ArunPrasad
Hi,
Thanks a lot for the update, ArunPrasad - I am glad everything works properly now.
Regards,
Vessy
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
If I want to use standard javascript alert messages everywhere but take advantage of this approach, is that possible? An example?
Current code looks like:
log_debug(`Found ${numBridges} selected bridges - processing selected bridges cannot continue`);
let msg = genAlertWarningMessage("The desktop list has no bridges. Please choose another layout or clear or reset the filters for this list to show at least 1 bridge for processing";
let oWnd = window.radalert(msg, 400, 200, "No Bridges In Desktop List", "confirmNoBridgesInListCallBackFn", "");
which shows a radalert window with an icon and message.
In another place is server-side code, written by an ex-developer, an alert is shown like this:
protected void CheckSessionState()
{
Logger.Instance.Debug("CheckSessionState() - started.");
if (HttpContext.Current == null || HttpContext.Current?.Session?.IsNewSession == true)
{
// dead session
RadAjaxManager.GetCurrent(Page).Alert(Globals.MSG_EXPIRED_ALERT);
Logger.Instance.Debug($@"{this.ToString()} '{Request.RawUrl}' redirects to Expiration");
Response.Redirect("~/Expiration.aspx", false);
HttpContext.Current?.ApplicationInstance?.CompleteRequest();
}
// do other stuff because we have a Session
...
...
...
}
which generates an Alert with the RadAjaxManager that is extremely simple in format, just a black box with a message in white. I don't really care that much what shows up as long as the alerts are consistent, but I slightly favor a popup window.
Is there a way to sort this out so that RadAjaxManager.Alert() generates the same thing as the first code?
Hi Allen,
The RadAjaxManager shows very simple alerts and, unfortunately, it cannot who RadAlert-like popups. If your application structure allows that, though, you can replace the AjaxManager alerts with RadAlerts as well.
Thank you for the shared suggestion, Allen! I have logged as a feature request in our Feedback portal and our developers will consider its implementation depending on the popularity of the item. You can track its progress here: