loginstatus causing problems vs2008

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

bretta91

Thread Starter
Joined
May 22, 2010
Messages
32
HI all,

I've added the loginstatus on all the pages to show a login button when not logged in and log out button when loged in. Everytime i click a link to change the page (to another page where also ive added loginstatus) It gives me an error. can anyone help me resolve the issue ?

here is the code of loginstatus>
<li><a href="login.aspx">
<asp:LoginStatus ID="LoginStatus1" runat="server"
LoginImageUrl="~/images/login1.JPG" LogoutImageUrl="~/images/logout.JPG" />
<span class="dis_none">Log In</span>
</a></li>





it gives me the following error>

Control 'LoginStatus1' of type 'LoginStatus' must be placed inside a form tag with runat=server.

[FONT=Arial, Helvetica, Geneva, SunSans-Regular, sans-serif] Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Control 'LoginStatus1' of type 'LoginStatus' must be placed inside a form tag with runat=server.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:

[HttpException (0x80004005): Control 'LoginStatus1' of type 'LoginStatus' must be placed inside a form tag with runat=server.]
System.Web.UI.Page.VerifyRenderingInServerForm(Control control) +8691203
System.Web.UI.WebControls.LoginStatus.RenderContents(HtmlTextWriter writer) +38
System.Web.UI.WebControls.LoginStatus.Render(HtmlTextWriter writer) +10
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
System.Web.UI.Page.Render(HtmlTextWriter writer) +29
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +12[/FONT]
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top