Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > How do I use the URL picker?

Thread Tools

How do I use the URL picker?

Posts: n/a
I'm creating a custom web control and a few of the properties should be
image URLs. How do you get the system to present the URL picker as an
option when the user is setting the control's properties? (Like the
standard controls do for image URLs...) Thanks.


Reply With Quote
Steven Cheng[MSFT]
Posts: n/a
Hi Jerry,

Welcome to the ASPNET newsgroup.

As for how to let our custom webcontrol's string property use the "URL
picker" at design-time(in VS.NET ide), based on my research, we can use the
"EditorAttribute" to apply some certain control editor to our custom
control's string property. There exists some buildin control property
editors in .net framework class library, for example:

UrlEditor, ImageUrlEditor....

Here is simple test control which configure its "Text" propety to use the
"ImageUrlEditor" at design-time in VS.NET ide:

[ToolboxData("<{0}:TestControl runat=server></{0}:TestControl>")]
public class TestControl : WebControl
[ Editor("System.Web.UI.Design.ImageUrlEditor, System.Design,
Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
public string Text
String s = (String)ViewState["Text"];
return ((s == null) ? String.Empty : s);

ViewState["Text"] = value;

Hope this helps.


Steven Cheng
Microsoft Online Support

Get Secure!
(This posting is provided "AS IS", with no warranties, and confers no

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
URL - substitution of a correct URL by a GUID like URL in favorites. Just D. ASP .Net Mobile 0 08-11-2004 04:26 PM
redirect URL's, return URL's, and URL Parameters Jon paugh ASP .Net 1 07-10-2004 05:29 AM
Invalid URL form or fully-qualified absolute URL was used. Use relative URLs Rudi Ahlers ASP General 11 04-11-2004 03:17 PM
Solution for: "Unable to validate that the file <name> matches the URL <url>" Doug ASP .Net 0 07-06-2003 02:40 PM