Groups | Blog | Home
all groups > asp.net building controls > december 2003 >

asp.net building controls : UserControl and property


Brian Bugge
12/26/2003 7:10:53 PM
Is it possible to display properties of my usercontrol in the propertygrid
in vs.net

eg.

[System.ComponentModel.Browsable(true),System.ComponentModel.EditorBrowsable
(EditorBrowsableState.Always),DesignerSerializationVisibility(DesignerSerial
izationVisibility.Visible)]
public string Text{

get{

return this.mytextvar;

}

set{

this.mytextvar=value;

}

}

The above does not work, anyone who knows why ?

The only properties in the propertygrid is: EnableViewStae, Visible,
(Databindings), ID

(It is not a custom control, but a System.Web.UI.UserControl)

Brian Bugge - Denmark

RadekP
12/30/2003 8:43:21 AM
With System.Web.UI.UserControl you are not going to achieve this. Only
Custom Web control will allow you to see/set your property in VS
(System.ComponentModel.Browsable(true). Sorry. You can still access your
user control's property programmatically. The good news is that it is all
going to be well implemented in upcoming VS.NET 2.0 ("Whidbey" in alpha
stage already has it).

Radek

[quoted text, click to view]

Teemu Keiski
12/30/2003 9:25:43 AM
Hi,

this is limitation with user controls and is not supported in current VS.NET
versions. New Web Matrix and becoming VS.NET should bring design-time
support for user controls (at web form) and probably also the way to view
properties in Property Browser.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist

[quoted text, click to view]

AddThis Social Bookmark Button