In my ASP.NET project, I'm attempting to trigger a popup on button click.
void Btn_Click(Object sender,EventArgs e)
{
string message = "**System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Exception: ::<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4c7d0c7d7c7c62787862797b627b7e">[email protected]</a> you are not authorized at EndPoint.Common.AuthenticateExt`(String uniqueKeyForLog, QueryLimitControlFor product) in d:\Builds\PROD\EndPoint\PROD - 5 EndPoint\src\EndPoint\Common.asmx.cs:line 141 at EndPoint.Common(ExtendConfirmParameters ConfirmParameters) in d:\Builds\PROD\EndPoint\PROD - 5 EndPoint\src\EndPoint\Common.asmx.cs:line 96 --- End of inner exception stack trace ---**"
dialog(this.Page, "Error", message , 400);
}
public void dialog(Page page, string title, string message, int width)
{
ScriptManager.RegisterStartupScript(page, this.GetType(), "dialog", "$('body').append($('<div>').attr({id:'dialog',title:'" + title + "'}));$('#dialog').html(' <style> .no-close .ui-dialog-titlebar-close { display: none;}</style><p>" + message + "</p>');$('#dialog').dialog({autoOpen: false,width: " + width.ToString() + ",modal: true,dialogClass: 'no-close',buttons: [{text: 'Okay',click: function() {$( this ).dialog( 'close' );$('#dialog').remove()}}]});$('#dialog').dialog('open');", true);
}
Query:
If I attempt to show the following message in a dialog box
**System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Exception: ::<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="97a6d7a6a7a7b9a3a3b9a2a0b9a0a5">[email protected]</a> you are not authorized at EndPoint.Common.AuthenticateExt`(String uniqueKeyForLog, QueryLimitControlFor product) in d:\Builds\PROD\EndPoint\PROD - 5 EndPoint\src\EndPoint\Common.asmx.cs:line 141 at EndPoint.Common(ExtendConfirmParameters ConfirmParameters) in d:\Builds\PROD\EndPoint\PROD - 5 EndPoint\src\EndPoint\Common.asmx.cs:line 96 --- End of inner exception stack trace ---**
I encounter the following error :
Uncaught SyntaxError: Unexpected token ILLEGAL
Which specific character is causing this unexpected behavior in the above message?
How can I address this issue in my ASP.NET application?
Any assistance would be highly valued.
Thank you.