ASP.NET ControlDesigner & smart tags

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top