Ask a Question related to ASP.NET Building Controls, Design and Development.
-
Lubomir #1
Parser Error
Hi,
I have a custom control, defined in the file LinkLabel.cs, compiled into
assembly MyControl.dll
namespace MyControl
{
[DefaultProperty("Text"), ToolboxData("<{0}:LinkLabel
runat=server></{0}:LinkLabel>")]
public class LinkLabel : Label
{
…..
}
.....
}
The control’s dll is in a bin directory of the web page, which will use it.
In my “asp” page I registered control:
<%@ Register TagPrefix="mspo" Namespace="MyControl" Assembly="MyControl" %>
and used the control:
<mspo:LinkLabel id="LinkLabel1" runat="server" ></mspo:LinkLabel>
In code behind:
protected MyControl.LinkLabel LinkLabel1;
…..
LinkLabel1.Text = "blablabla";
I can compile my web page with no error, however, when I run it, I get a
parser error:
Parser Error Message: The base class includes the field 'LinkLabel1', but
its type (MyControl.LinkLabel) is not compatible with the type of control
(MyControl.LinkLabel).
Source error line:
<mspo:LinkLabel id="LinkLabel1" runat="server" ></mspo:LinkLabel>
Please note, that the types mentioned in Parser Error Message are identical.
When I change the definition of a control object in codebehind class
from
protected MyControl.LinkLabel LinkLabel1;
To
protected Label LinkLabel1; // Label is the base class for LinkLabel
everything is good.
What is wrong with the parser when I use inherited, LinkLabel class?
Thanks for a help.
Lubomir
Lubomir Guest
-
need help on parser error
hi, I've a problem in accessing user controls when I deploy the application in the production server.. I'm receiving the following error... ... -
HTML::Parser error
I recently installed PERL on my system but am having a problem with the parser.pm file. Whenever I try to run a script the following error shows... -
Parser Error: Type XYZ does not have a property named 'cc3:MyItems' (complete posting) ASP.NET Web Control Error
I am having problems trying to get this part of the functionality working on my control and I hope somebody has a clue about how to resolve it. ... -
Error Creating Control: Parser Error DocHeader does not have a property named 'cc3:MyItems'
I am having problems getting this webcontrol working properly. Everything else works fine except having items. So here is the low-down on the... -
Parser Error - still...
I'm getting Parser Error, Could not load type 'namespace.class'. I'm only getting this error when I try and open a frameset. I can open the... -
Rowland Shaw #2
RE: Parser Error
"Lubomir" wrote:
Are you referencing the same assembly at compile time to that being used at> I have a custom control, defined in the file LinkLabel.cs, compiled into
> assembly MyControl.dll
>
> The control’s dll is in a bin directory of the web page, which will use it.
>
> I can compile my web page with no error, however, when I run it, I get a
> parser error:
>
> Parser Error Message: The base class includes the field 'LinkLabel1', but
> its type (MyControl.LinkLabel) is not compatible with the type of control
> (MyControl.LinkLabel).
>
> Please note, that the types mentioned in Parser Error Message are identical.
runtime?
Rowland Shaw Guest
-
sandy #3
Parser error
Parser Error
Description: An error occurred during the parsing of a resource required to
service this request. Please review the following specific parse error
details and modify your source file appropriately.
Parser Error Message: The located assembly's manifest definition with name
'Microsoft.Web.UI.WebControls' does not match the assembly reference.
Source Error:
Line 5:
Line 6: <%@ Register tagprefix ="BTL" assembly="CustomControl"
NameSpace="BTLIntraPageDesignLayout" %>
Line 7: <%@ Register TagPrefix="IE"
Namespace="Microsoft.Web.UI.WebControls"
Assembly="Microsoft.Web.UI.WebControls, Version=1.0.2.226, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" %>
Line 8:
Line 9:
Help needed.
Thanks.
Sandy
sandy Guest



Reply With Quote

