Your Control won't compile. It has errors in it. You have inherited Control,
and referenced "Controls[0]" - but there are no Controls in the Control.
You need to get and use some debugging tools and techniques. There are free
ASP.Net tools available from Microsoft. see
http://msdn.microsoft.com/vstudio/express/vwd/
--
HTH,
Kevin Spencer
Microsoft MVP
Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
"kal" <(E-Mail Removed)> wrote in message
news:wxc9i.1639$(E-Mail Removed)...
>I have registered my custom control in web.config as follows:
> <add tagPrefix="PhoenixControls" namespace="PhoenixControls"
> assembly="PhoenixControls"/>
>
> I have added a file called phoenixcontrols.cs to App_Code folder and in
> this file is this simple code:
>
> namespace PhoenixControls
>
> {
>
> public class EncodeHtml : Control {
>
> protected override void Render(HtmlTextWriter writer) {
>
> LiteralControl lc;
>
> lc = (LiteralControl) Controls[0];
>
> writer.Write("This is a test" + lc.Text);
>
> }}}
>
>
> Including all the 'using' statements
>
> Now I put this in a default.aspx page
>
> <PhoenixControls:EncodeHtml>pc-control</PhoenixControls:EncodeHtml>
>
> i get an error - EncodeHtml element is not known. the page displays but
> has none of the custom control changes.
>
> Help appreciated
>
> Kal
>
>