Good afternoon all,
In what seems like a never-ending quest to get my arms around ASP.NET I have new question. I am trying my hand at building a custom control, VERY basic in nature, to understand the concept. I am trying to use the Page_Load subroutine within a code-behind page to set two properties of the control. Despite my adding the control to the web-form, the code-behind page is not recognizing the control and I am getting "not-declared" errors. I have posted a code snippet below. Any help is appreciated.
Web-Form:
<%@ Register TagPrefix="myControls" Namespace="myControls" Assembly="ShowColor" %>
<%@ Page Language="
vb" AutoEventWireup="false" Codebehind="DisplayShowColor.aspx.
vb" Inherits="learn.DisplayShowColor"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>DisplayShowColor</title>
</HEAD>
<body MS_POSITIONING="GridLayout">
<myControls:ShowColor id="ctrlShowColor" Runat="server" />
</body>
</HTML>
Code-Behind:
Public Class DisplayShowColor
Inherits System.Web.UI.Page
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ctrlShowColor.Text = "Hello Ethan. Rise and Shine"
ctrlShowColor.Color = "Orange"
End Sub
End Class
Dolphin Bay, Inc. -- turning visions into eReality(tm) -- West Palm Beach, FL
Website Design, Internet Strategy, Search Engine Marketing
www.DolphinBay.biz