K
kal
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
<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