Home » Category » Microsoft Visual Basic

Microsoft Visual Basic: '' Could not be set on property 'Items' - Error

205| Thu, 22 May 2008 01:56:00 GMT| anonymous| Comments (2)
Sorry if this is not the correct group i could not see one for web controls

Hello

I am trying to write a cutom web control, The control contains a customer
collection that i want to use the Collection Editor in properties to add
members to this collection.

In design mode the control works correctly but when i run the application
the control in the designer swaps to a "Error creating Control" gray box,
but it seems to display correctly in the web browser

Im fairly new to this so not sure what people would like to see to help me -
but shout and i send something

Thanks in advance,

Keywords & Tags: set, property, items, error, microsoft, visual basic, vb

URL: http://www.programmerbase.com/visual-basic/4/
 
«« Prev - Next »» 2 helpful answers below.
I have foud the problem it was due to the Items property being read/write

so the property definition should be

<DesignerSerializationVisibility(DesignerSerializationVisibility.Content), _
PersistenceMode(PersistenceMode.InnerProperty), _
Bindable(True), Category("Appearance")> ReadOnly Property Items() As
TableDef.ItemsCol
Get
Return mobjTable.Items
End Get
End Property

"Murray" <murrayjack...yahoo.com> wrote in message
news:%23MDzgVqOFHA.4052...TK2MSFTNGP12.phx.gbl...
> Sorry if this is not the correct group i could not see one for web
> controls
> Hello
> I am trying to write a cutom web control, The control contains a customer
> collection that i want to use the Collection Editor in properties to add
> members to this collection.
> In design mode the control works correctly but when i run the application
> the control in the designer swaps to a "Error creating Control" gray box,
> but it seems to display correctly in the web browser
> Im fairly new to this so not sure what people would like to see to help
> me -
> but shout and i send something
> Thanks in advance,
>
>

murray | Thu, 22 May 2008 01:57:00 GMT |

Here is a web control property
<Bindable(True), Category("PROPERTY CATEGORY"), DefaultValue("")> Property
[NAME]() As Integer
Get
Return NAME
End Get
Set(ByVal Value As Integer)
NAME = Value
End Set
End Property
"Murray" <murrayjack...yahoo.com> wrote in message
news:%23MDzgVqOFHA.4052...TK2MSFTNGP12.phx.gbl...
> Sorry if this is not the correct group i could not see one for web
> controls
> Hello
> I am trying to write a cutom web control, The control contains a customer
> collection that i want to use the Collection Editor in properties to add
> members to this collection.
> In design mode the control works correctly but when i run the application
> the control in the designer swaps to a "Error creating Control" gray box,
> but it seems to display correctly in the web browser
> Im fairly new to this so not sure what people would like to see to help
> me -
> but shout and i send something
> Thanks in advance,
>
>

chris | Thu, 22 May 2008 01:58:00 GMT |

Microsoft Visual Basic Hot Answers

Microsoft Visual Basic New questions

Microsoft Visual Basic Related Categories