diff --git a/XPS/Web.config b/XPS/Web.config index 2cdc712..61b86d2 100644 --- a/XPS/Web.config +++ b/XPS/Web.config @@ -164,7 +164,7 @@ - + diff --git a/XPS/WebMasterPages/AjaxTitle.master.cs b/XPS/WebMasterPages/AjaxTitle.master.cs index 0b69e43..4e9c8d6 100644 --- a/XPS/WebMasterPages/AjaxTitle.master.cs +++ b/XPS/WebMasterPages/AjaxTitle.master.cs @@ -16,7 +16,7 @@ public partial class AjaxTitle : System.Web.UI.MasterPage { base.OnLoad(e); Page.Title = SteamWare.memLayer.ML.confReadString("_titoloPagina"); - + Mod_pageTitleAndSearch1.doUpdate(); } protected override void OnInit(EventArgs e) diff --git a/XPS/WebUserControls/mod_pageTitleAndSearch.ascx.cs b/XPS/WebUserControls/mod_pageTitleAndSearch.ascx.cs index 1be13eb..d85dfc3 100644 --- a/XPS/WebUserControls/mod_pageTitleAndSearch.ascx.cs +++ b/XPS/WebUserControls/mod_pageTitleAndSearch.ascx.cs @@ -14,24 +14,21 @@ namespace XPS.WebUserControls { public partial class mod_pageTitleAndSearch : SteamWare.UserControl { - #region area protected - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - traduciObj(); - } protected string _titolo; - protected void traduciObj() + public void doUpdate() { - DS_Auth.PermessiRow riga = (DS_Auth.PermessiRow)devicesAuthProxy.stObj.permessi.Select(string.Format("URL = '{0}.aspx' OR URL = '{0}'", devicesAuthProxy.pagCorrente))[0]; - _titolo = riga.NOME; + try + { + DS_Auth.PermessiRow riga = (DS_Auth.PermessiRow)devicesAuthProxy.stObj.permessi.Select(string.Format("URL = '{0}.aspx' OR URL = '{0}'", devicesAuthProxy.pagCorrente))[0]; + _titolo = riga.NOME; + } + catch + { + _titolo = devicesAuthProxy.pagCorrente; + } lblTitolo.Text = traduci(_titolo); } - - #endregion - } } \ No newline at end of file