Matt Scilipoti's WebLog

.NET et al

Strange Error: in ASP.

Strange Error. Happened with Literal too. 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 base class includes the field 'ConstructIDLabel', but its type (System.Web.UI.WebControls.Label) is not compatible with the type of control (System.Web.UI.WebControls.TextBox). Source Error:
Line 14: <table>
Line 15: 	<tr>
Line 16: 		<td><asp:TextBox id="ConstructIDLabel" runat="server"></asp:TextBox></td>
Line 17: 		<td><asp:TextBox id="ConstructIDTextBox" runat="server" Text='<%# DataBinder.Eval(DataView1, "[0].ConstructID") %>'></asp:TextBox></td>
Line 18: 	</tr>

Comments

Alex Lowe said:

Just a guess but I'd say that (in your codebehind or somewhere in your script tags) you have an object named 'ConstructIDLabel' and it is of type System.Web.UI.WebControls.Label. So, you have a private member variable of one type and a static control declaration of a different type. Change the private member variable so that it is of type System.Web.UI.WebControls.TextBox and all will be well.
# February 25, 2003 7:48 PM

Matt Scilipoti said:

That was it. There were quite a few declares left after I deleted the original controls.
Thanks.
# February 28, 2003 3:11 PM

yildiz said:

thanks a lot alex.
# April 28, 2003 4:36 PM

James McFarland said:

I had this problem too.

The problem was that I changed the type of a server control instance on an aspx page, but did not change the id.

Thus, the code-behind class for my aspx page still had the declaration for the control with the old type, while the aspx was claiming it was something else.

Invoking the desiger in VS.NET updates the declaration to the right type (or you could change it by hand in the code behind.

Thanks for the posting Alex.

-james
# April 12, 2004 4:45 PM

salesgenie said:

Thanks a lot for the article.Much thanks again. Want more.

# January 21, 2013 6:22 AM

Los Angeles Facelift said:

Really informative blog article.Really looking forward to read more.

# January 23, 2013 4:10 PM

Face Buccal Removal said:

Hey, thanks for the article. Awesome.

# January 23, 2013 4:56 PM

business certificate online said:

Im obliged for the blog post.Much thanks again. Will read on...

# January 23, 2013 5:41 PM

health care financing said:

Wow, great post.Really looking forward to read more. Keep writing.

# January 23, 2013 5:58 PM

mba in one year said:

I value the blog post.Thanks Again.

# January 23, 2013 6:27 PM

www.CrestMediaInc.com said:

Thanks for sharing, this is a fantastic article.Much thanks again. Fantastic.

# January 23, 2013 8:04 PM

iPhone Application Development said:

Really appreciate you sharing this blog article. Will read on...

# January 24, 2013 3:41 AM

Los Angeles Facelift said:

Appreciate you sharing, great blog article.Really looking forward to read more. Really Great.

# January 24, 2013 4:28 AM

http://www.doctortaylor.com/ said:

Im thankful for the article post.Really looking forward to read more. Cool.

# January 24, 2013 5:17 AM

dc to dc converter said:

This is one awesome blog post.Thanks Again. Awesome.

# January 24, 2013 5:32 AM

Short Films said:

Im grateful for the blog article.Thanks Again. Really Great.

# January 24, 2013 6:42 AM

How To Be A Short Film Director said:

A round of applause for your post.Really looking forward to read more.

# January 24, 2013 7:51 AM

http://www.lakearrowheadweddings.com/ said:

Im obliged for the blog.Much thanks again.

# January 24, 2013 8:00 AM

conversion rate optimization said:

I appreciate you sharing this blog. Want more.

# January 24, 2013 8:45 AM

Mobile Application Development said:

Hey, thanks for the article post.Really looking forward to read more. Great.

# January 24, 2013 9:39 AM

Los Angeles Personal Injury Attorney said:

Thanks a lot for the post.Thanks Again.

# January 24, 2013 9:40 AM

Wing Chun in Orange County said:

Hey, thanks for the blog article.Much thanks again. Much obliged.

# January 27, 2013 1:25 PM

Envirocycle Composter Bin said:

Great, thanks for sharing this blog post. Will read on...

# January 28, 2013 5:59 AM

painting denver said:

Major thanks for the blog.Much thanks again. Great.

# January 29, 2013 5:03 AM

loss weight pills said:

u1cdu0 Im thankful for the article.Really looking forward to read more. Great.

# January 31, 2013 4:31 PM

Staedtler Pencil said:

Thanks so much for the blog article.Really looking forward to read more. Really Great.

# February 2, 2013 11:01 PM

Foolscap Suspension Files said:

A round of applause for your blog post.Thanks Again. Fantastic.

# February 3, 2013 1:24 AM

printer ink cartridges said:

Im grateful for the blog post.Much thanks again. Fantastic.

# February 3, 2013 1:30 PM