User-1004886483 posted
Hi, when i load my solution i have the following alert :
'System.Web.UI.Page.RegisterStartupScript(string, string)' est obsolète : 'The recommended alternative is ClientScript.RegisterStartupScript(Type type, string key, string script). http://go.microsoft.com/fwlink/?linkid=14202' C:\Projets\MYPROGWebsite\MYPROGWebsite\Transfertfichier.aspx.cs
168
this is the code of the page Transfertfichier.aspx.cs :
/// <summary>
/// Effacer les lettres temporaires du serveur
/// </summary>
private void ViderDossier(string folderPath)
{
try
{
if (!string.IsNullOrEmpty(folderPath))
{
DirectoryInfo dir = new DirectoryInfo(folderPath);
foreach (FileInfo file in dir.GetFiles())
{
file.Delete();
}
}
}
catch (IOException ex)
{
Page.RegisterStartupScript("Exception", "alert('" + ex.Message + "');");
}
}
#endregion
how to fix this?