From 100cd5f5b5dbccb398d00d1848d66d6b575e6734 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 16 May 2017 10:37:32 +0200 Subject: [PATCH] fix errore gestione titolo pagina admin con URL senza .aspx... --- MP-Admin/Web.config | 2 +- .../mod_pageTitleAndSearch.ascx.cs | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/MP-Admin/Web.config b/MP-Admin/Web.config index b72df897..aa63a77d 100644 --- a/MP-Admin/Web.config +++ b/MP-Admin/Web.config @@ -69,7 +69,7 @@ - + diff --git a/MP-Admin/WebUserControls/mod_pageTitleAndSearch.ascx.cs b/MP-Admin/WebUserControls/mod_pageTitleAndSearch.ascx.cs index 73022e26..8e910b7d 100644 --- a/MP-Admin/WebUserControls/mod_pageTitleAndSearch.ascx.cs +++ b/MP-Admin/WebUserControls/mod_pageTitleAndSearch.ascx.cs @@ -1,4 +1,5 @@ using SteamWare; +using System; public partial class mod_pageTitleAndSearch : ApplicationUserControl { @@ -7,12 +8,20 @@ public partial class mod_pageTitleAndSearch : ApplicationUserControl protected string _titolo; protected override void traduciObj() { - DataLayer_AnagGen.PermessiRow riga = (DataLayer_AnagGen.PermessiRow)user_std.UtSn.permessi.Select(string.Format("URL = '{0}'", _paginaCorrente))[0]; - _titolo = riga.NOME; + try + { + DataLayer_AnagGen.PermessiRow riga = (DataLayer_AnagGen.PermessiRow)user_std.UtSn.permessi.Select(string.Format("URL = '{0}.aspx' OR URL = '{0}'", _paginaCorrente))[0]; + _titolo = riga.NOME; + } + catch (Exception exc) + { + logger.lg.scriviLog(string.Format("Errore in decodifica titolo:{0}{1}", Environment.NewLine, exc)); + _titolo = _paginaCorrente; + } lblTitolo.Text = traduci(_titolo); } - + #endregion }