Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > page not seeing custom control, can't set properties

Thread Tools page not seeing custom control, can't set properties

Mad Scientist Jr
Posts: n/a
I have a page with a custom control, and for some reason
the codebehind is not seeing the control.

The control is in a file "page_footer.ascx" in the root of the site
and contains the following:

<%@ Control Language="vb" AutoEventWireup="false"
Codebehind="page_footer.ascx.vb" Inherits="mysite1.page_footer"
TargetSchema="" %>
<script language="VB" runat="server">
Public sFooterText As String = ""
<table border="0" width="100%" cellSpacing="0" cellPadding="0">
<td align="right"><font

The control is defined in my ASPX page (also in the root of the site)
at the top of the HTML as:

<%@ Register TagPrefix="site1" TagName="page_footer"
Src="page_footer.ascx" %>

An instance is defined in the HTML body as:

<site1age_footer id="page_footer_1" runat="server"
sFooterText="Copyright 2004"></site1age_footer><br>

In the codebehind I try this:

page_footer_1.sFooterText = "Copyright 2003"

but "page_footer_1" is underlined in blue and I get the error 'Name
"page_footer_1" is not declared.'

What am I doing wrong?
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Set Page properties in custom control NKaufman ASP .Net Building Controls 1 08-20-2008 10:28 AM
Showing custom properties for page subclasses in Properties pane Harlan Messinger ASP .Net 0 02-18-2008 04:45 PM
Set Custom Page properties declaratively =?Utf-8?B?UmljaGFyZCBCcm93bg==?= ASP .Net 2 12-02-2005 04:47 PM page not seeing custom control, can't set properties Mad Scientist Jr ASP .Net Web Controls 1 02-19-2004 01:33 PM