Help needed working on someone's code that was not written in visual studio

Posted on 2006-05-21
Medium Priority
Last Modified: 2008-01-09
 I am taking over someone else's code and i have come across some code i have not seen before

When i load the default page i get this message

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 'title', but its type (System.Web.UI.HtmlControls.HtmlContainerControl) is not compatible with the type of control (System.Web.UI.HtmlControls.HtmlTitle).

Source Error:

Line 19: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
Line 20: <head runat="server">
Line 21:       <title id="title" runat="server">Rural Meeting Place- Home Page</title>
Line 22:       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
Line 23:

This is the src for the default page...<%@Page src="pageTemplate.aspx.vb" inherits="PageTemplate" validateRequest="false" %>

This is taken from PageTemplate.vb

public mustinherit Class PageTemplate
      inherits System.Web.UI.Page

      protected title as HtmlContainerControl

When i change the type of title to (System.Web.UI.HtmlControls.HtmlTitle) i then get a different error:

'innerText' is not a member of 'System.Web.UI.HtmlControls.HtmlTitle'.
dtr = cmd.executeReader()
if dtr.read()
title.innerText = dtr("pagetitle").toString()
description.Attributes("content") = dtr("metadescription")
keywords.Attributes("content") = dtr("metakeywords")

Do you know how i can fix this? I have never used htmltitle before. Thanks
Question by:andieje
1 Comment

Accepted Solution

rstrader earned 2000 total points
ID: 16729955

instead try
System.Web.UI.HtmlControls.HtmlGenericControl Title

"The HtmlGenericControl provides an ASP.NET server control implementation for all unknown HTML server control tags not directly represented by a specific HTML server control (for example, <span>, <div>, <body>, and so on)."
per Microsoft docs


Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question