Velocity Reviews

Velocity Reviews (
-   ASP .Net Building Controls (
-   -   Control Designer change property but does not persist (

Vipeo 01-12-2006 10:02 AM

Control Designer change property but does not persist
Hi All,

I'm developing a custom control for ASP.NET (2.0 but this shouldn't matter).
I've got a property PageID (Guid) in this control:

public class MyControl : Control
private Guid pageId = Guid.Empty;

DesignerSerializationVisibility(DesignerSerializat ionVisibility.Visible),
public Guid PageID
return pageID;

Also, I have a control designer for this control:

class PageDesignerEditor : WindowsFormsComponentEditor
public override bool EditComponen
(System.ComponentModel.ITypeDescriptorContext context, object component,
IWin32Window owner)
// creates a DesignerTransaction
// show a modal dialog (dialog editor)
// - the property is set by PropertyDescriptor.SetValue(component, value)
// commit transaction

A problem = the value gets changed but not persisted in the WebForm source!
Interestingly, if I change the value of the PageID from Properties toolbox it
appears in the source HTML!

I'm missing something here...

Thank you.

All times are GMT. The time now is 08:21 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.