I'm designing a component, and I'd like to have it's properties show up in Visual Studio 2003.
From what I can tell (using the Help menu, as well as the Add/Remove Programs panel), I have .NET Framework 1.1 on my computer.
I've gone through a few articles on the message board, and found posts that seemed promising. One of them made use of the
System.Web.UI.Design namespace, which I don't have! I know this is weird, but I can't compile any code that refers to anything under that namespace, nor does it show up in Intellisense autocomplete.
Had I been able to, I would have liked to edit my url property using the default url editor, by calling something like [EditorAttribute(typeof(System.Web.UI.Design.UrlEditor), typeof(UITypeEditor))]
Right now, i'm just struggling to have the property show up in the Properties box at design time.
Oddly, i've added information for the default prefix for my tags when inserting my component into a web page, and those work. But the property just won't show up.
Any thoughts on how I could get it to show? What about getting access to the System.Web.UI.Design namespace...
Here's my code
using System;
using System.Web;
using System.Web.Caching;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
using System.Xml;
using System.Xml.XPath;
using System.Xml.Xsl;
using System.Collections.Specialized;
using System.Text;
using System.Text.RegularExpressions;
[assembly:TagPrefix("NineMedia.Cms", "nm")]
namespace NineMedia.Cms
{
[ToolboxData("<{0}:EditorPanel runat=\"server\" /></{0}:EditorPanel>"), DefaultProperty("BrowserDefaultUrl")]
public class EditorPanel : Control
{
#region Public Properties
/// <summary>
/// The url to load at startup
/// </summary>
[Browsable(true),
Category("Base Urls"),
DefaultValue("about:blank"),
Description("Start page url"),
EditorAttribute(typeof(System.String), typeof(System.Uri)),
PersistenceMode(PersistenceMode.Attribute)
]
public string BrowserDefaultUrl = "about:blank"; #endregion
//[... other code omitted, like rendering methods ...]
}
}