C
cruster
Hey folks.
I'm developing an ASP.NET custom control and have assciated a custom
ControlDesigner with it. I'm using smart tags in design time like this:
public override DesignerActionItemCollection
GetSortedActionItems()
{
if (_actions == null)
{
_actions = new DesignerActionItemCollection();
_actions.Add(new DesignerActionMethodItem(this,
"EditValues", "Edit values", true));
}
return _actions;
}
public void EditValues()
{
((MyComponent)this.Component).Foo = "bar";
// I guess I need to call something here
}
When I click "Edit values" smart tag, the property Foo will get a
value "bar", it's nicely shown in the Properties window, but when I go
to the HTML Source of the ASP.NET page, property Foo is not set in the
code:
<cc:MyComponent runat="server" ID="myc1" />
When I go back to design view, Foo is empty.
So i guess after setting Foo to "bar" I need to call something, that
will refresh the HTML to something like:
<cc:MyComponent runat="server" ID="myc1" Foo="bar" />
Please, help me out of this. Thanks.
I'm developing an ASP.NET custom control and have assciated a custom
ControlDesigner with it. I'm using smart tags in design time like this:
public override DesignerActionItemCollection
GetSortedActionItems()
{
if (_actions == null)
{
_actions = new DesignerActionItemCollection();
_actions.Add(new DesignerActionMethodItem(this,
"EditValues", "Edit values", true));
}
return _actions;
}
public void EditValues()
{
((MyComponent)this.Component).Foo = "bar";
// I guess I need to call something here
}
When I click "Edit values" smart tag, the property Foo will get a
value "bar", it's nicely shown in the Properties window, but when I go
to the HTML Source of the ASP.NET page, property Foo is not set in the
code:
<cc:MyComponent runat="server" ID="myc1" />
When I go back to design view, Foo is empty.
So i guess after setting Foo to "bar" I need to call something, that
will refresh the HTML to something like:
<cc:MyComponent runat="server" ID="myc1" Foo="bar" />
Please, help me out of this. Thanks.