Ask a Question related to ASP.NET Building Controls, Design and Development.
-
caviar #1
DefaultValue not working (string)
My defaultvalue attribute is not working. If i drop this control from
thetoolbox onto my page
the properties are empty. They keep being empty if i run this page on the
server. The only way to fix it is to initialize the property hidden internal
field whit the same value.
Is this by design or is something else wrong?
regards hj
public class WebChangePasswordControl : System.Web.UI.WebControls.WebControl
private string _title; //empty prop everywhere no def value
//private string _title = "Change Password"; //Now the property has an
default value..
[Bindable(false), Category("Appearance"),
DefaultValue("Change Password")]
public string Title
{
get{return _title;}
set{_title = value;}
}
caviar Guest
-
#40792 [NEW]: Wish: Function array_get(&$mixed, $key, $defaultvalue)
From: t dot kloppenburg at billiton dot de Operating system: Linux PHP version: 5.2.1 PHP Bug Type: Feature/Change Request... -
DefaultValue attribute doesn't get set in a composite custom control
I have a simple composite control with the following attributes: public string NameLabelText { get { EnsureChildControls(); return... -
DefaultValue for Public Property of ASP.NET 2.0 UserControl not appearing in Properties Window
First, I'm using Visual Web Developer 2005 Express Edition, which I hope is exactly the same as Visual Studio 2005 minus a bunch of useful... -
Working OLE DB string for an Access DB
Hi All This may be striaght forward for most, but I am really getting in a tiswas with it. I have been to the able consulting,... -
String matching not working
Hi, I am quite new to Perl. I have several sets of data and within each individual file news stories are seperated using ========. My goal is... -
Andrew #2
Re: DefaultValue not working (string)
By Design.
The defaultValue attribute is a hint for the designer.
You need to put the same value there that you put into the variable when you
initialize it.
It should change how the design time html for the control is generated.
-Andrew
"caviar" <caviar-at-xsfourall.nl> wrote in message
news:eX#zRMQfDHA.368@TK2MSFTNGP12.phx.gbl...internal> My defaultvalue attribute is not working. If i drop this control from
> thetoolbox onto my page
> the properties are empty. They keep being empty if i run this page on the
> server. The only way to fix it is to initialize the property hiddenSystem.Web.UI.WebControls.WebControl> field whit the same value.
>
> Is this by design or is something else wrong?
>
> regards hj
>
> public class WebChangePasswordControl :>
>
> private string _title; //empty prop everywhere no def value
> //private string _title = "Change Password"; //Now the property has an
> default value..
>
> [Bindable(false), Category("Appearance"),
> DefaultValue("Change Password")]
> public string Title
> {
> get{return _title;}
> set{_title = value;}
> }
>
>
Andrew Guest
-
caviar #3
Re: DefaultValue not working (string)
Andrew wrote:
Ok thanx!> By Design.
>
> The defaultValue attribute is a hint for the designer.
> You need to put the same value there that you put into the variable
> when you initialize it.
>
> It should change how the design time html for the control is
> generated.
>
> -Andrew
caviar Guest



Reply With Quote

