This project is read-only.

Removal of Login Link Causes Error

Topics: ASP.NET 2.0
Mar 2, 2011 at 10:37 AM

Hi Guys,

I didn't want to show the Login link in the header menu bar so as advised here, I removed:

 <div class="login">
         <span runat="server" id="aUser"></span><a runat="server" id="aLogin" />

From the Menu section of the header in site.master

If I remove though I get a Server Runtime Error

Does anyone have any idea why?

(I'm using the latest Version 2)


Mar 2, 2011 at 1:17 PM

Comments this in site.master.cs :


if (Security.IsAuthenticated)
aLogin.InnerText = Resources.labels.logoff;
aLogin.HRef = Utils.RelativeWebRoot + "account/login.aspx?logoff";
aLogin.HRef = Utils.RelativeWebRoot + "account/login.aspx";
aLogin.InnerText = Resources.labels.login;

Mar 2, 2011 at 5:59 PM

Many thanks that worked a treat :-)

Best wishes