I'm working on ASP.NET AJAX Web Application.
As part of the requirement, I need to show message to the end user with the uploaded file location. Everything is fine, but the alert message never shows "/" symbols in the path.
For the path: \\shrestasoft\intranet\CorrectionReports\ReportsWithAccount\CorrectionReportWithAccount-Dec-22-2021-12-31-36-PM.xlsx
Below is how my alert dialog is displaying:
\shrestasoftintranetCorrectionReportsReportsWithAccountCorrectionReportWithAccount-Dec-22-2021-12-31-36-PM.xlsx
I've written the below code:
public static void ShowAlertWithFileLocation(object sender, string message)
{
message = "alert('" + message + "');";
ScriptManager.RegisterClientScriptBlock((sender as Control), typeof(ScriptManager), "alert", message, true);
}
I've tried to use HtmlUtility.HtmlEncode() method, but that did not work for me. Can someone suggest how can I get the appropriate filename with path?
