Hi Andy,
The error is probably on the .aspx page or .ascx.
Here is a code snippet that will give this exact error:
<body>
<form id="Form1" method="post" runat="server">
<asp:CheckBoxLi st id="CheckBoxLis t1" runat=""></asp:CheckBoxLis t>
</form>
</body>
Note that the runat attribute do NOT have server value. You can correct the
error by writing the as this:
<body MS_POSITIONING= "FlowLayout ">
<form id="Form1" method="post" runat="server">
<asp:CheckBoxLi st id="CheckBoxLis t1"
runat="server"> </asp:CheckBoxLis t>
</form>
</body>
--------------------------
Jean-Claude Morin, MCP
Software Developer
2k1Soft/kCentric, Canada
"ADavidson" <AD*******@disc ussions.microso ft.com> wrote in message
news:55******** *************** ***********@mic rosoft.com...
I'm getting a {"Parser Error: The Runat attribute must have the value
Server." } error when I try to get the Server.GetlastE rror() in the
Global.asax codebehind.
Why am I getting this?
I tried to remove the code-behind and add the <script language="C#"
runat="server"> but that fails as well.
The code is simply:
protected void Application_Err or( object src, EventArgs e )
{
Exception exc = Server.GetLastE rror(); // fails here
Trace.Write (exc.Message.To String());
}
I've found nothing anywhere on this.
Thanks for your help
--Andy