This is a custom alert box, on clicking ok it will redirect to specified page.
var dialogConfirmed = false;
function AlertRedirect(obj, title, dialogText, url) {
if (!dialogConfirmed) {
$('body').append(String.Format("<div id="dialog"><p>{1}</p></div>",
title, dialogText));
$('#dialog').dialog
({
height: 100,
width: 200,
modal: true,
resizable: false,
draggable: false,
position: 'center',
closeOnEscape: true,
close: function (event, ui) { $('body').find('#dialog').remove(); },
buttons:
{
'OK': function () {
$(this).dialog('close');
dialogConfirmed = true;
location.href = url;
}
}
});
}
return dialogConfirmed;
}
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "startupScript", "AlertRedirect('','','Your Message Here.','" + url + "');", true);