fix errore gestione titolo pagina admin con URL senza .aspx...

This commit is contained in:
Samuele E. Locatelli
2017-05-16 10:37:32 +02:00
parent 904d0e55a7
commit 100cd5f5b5
2 changed files with 13 additions and 4 deletions
@@ -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
}