"Walter Wang [MSFT]" <wa****@online.microsoft.comwrote in message
news:sO****************@TK2MSFTNGHUB02.phx.gbl...
Hi Allan,
Is your custom web control a User Control or a Server Control? I assume
you're creating a custom Server Control which inherits from the Wizard
control.
Yes it's a server control.
When you use this customer Server Control on a Web Form, you will
also need to assign the ID property for it. For example:
<snip>
There is an ID assigned to the tag, and everything runs fine when I run the
page, the problem only occurs in design view.
I've added IDs to all the controls that are generated programatically and
now I get a different error (again only in design view not when I run the
page)
On the Child Control I've added a "CustomWizard" property in whitch I set
the Wizard control that the Child is a Child of (the header knows what
wizard it's part of).
Now I get the following error in design view:
"Cannot create an object of type 'CustomWizard' from its string
representation 'CustomWizard1' for the CustomWizard Property."
I guess it's because of some kind of serialization or something so I've
added the following attributes to tha CustomWizard property in the child
control:
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.EditorBrowsable(System.Compo nentModel.EditorBrowsableState.Never)]
[System.ComponentModel.DesignerSerializationVisibil ity(System.ComponentModel.DesignerSerializationVis ibility.Hidden)]
But that didn't solve the problem.
Can't you add properties to controls and only use them programatically? What
am I missing?
Kind Regards,
Allan Ebdrup
--
Try a beta of my free Survey solution that makes heavy use of AJAX at
http://obsurvey.com, feedback is very welcome.