Hi all
I've been trying to create a custom attribute for a control on my form from some stuff in the MSDN code. I want to assign several custom attributes to it and the code states I should type the following:
I get build errors telling me that 'each of the custom properties' could not be found (are you missing a using directive or an assembly reference?) e.g. The type or namespace name 'Description' could not be found (are you missing a using directive or an assembly reference?).
I've read up a bit in MSDN and it looks like I'm going to have to create an Attribute class (from System.Attribute). Is this right? Or is there something I'm missing here?
I have the following namespaces declared:
Thanks as always
Craftor
I've been trying to create a custom attribute for a control on my form from some stuff in the MSDN code. I want to assign several custom attributes to it and the code states I should type the following:
Code:
private string xsltUrl;
[
Browsable(true),
Description("A relative url of the XSLT to apply to the XML"),
Category("Data"),
DefaultValue("")
]
public string XsltUrl {
get
{
return this.xsltUrl;
}
set
{
this.xsltUrl = value;
}
}
I get build errors telling me that 'each of the custom properties' could not be found (are you missing a using directive or an assembly reference?) e.g. The type or namespace name 'Description' could not be found (are you missing a using directive or an assembly reference?).
I've read up a bit in MSDN and it looks like I'm going to have to create an Attribute class (from System.Attribute). Is this right? Or is there something I'm missing here?
I have the following namespaces declared:
Code:
using System;
using System.Xml;
using System.Xml.Xsl;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
Thanks as always
Craftor