G
Gergely Varadi
Like the <asp:ListBox> and <asp:ListItem> pair, my control use item
definitions, just they are in another assembly:
<mycontrollib:myctrl1>
<Params>
<myitemlib:myitem someattr="someval1">
some text1
</myitemlib:myitem>
<myitemlib:myitem someattr="someval2">
some text2
</myitemlib:myitem>
</Params>
</mycontrollib:myctrl1>
When I drag the control on the page, all the dependencies will be
referenced under the "References" node, but the page will contain <@
Register TagPrefix...> only for 'mycontrollib'.
So Visual Studio throws an exception because it cannot find
'myitemlib'.
2nd problem
-----------
Inserting manually <@ Register TagPrefix...> for 'myitemlib' and
editing the 'Params' collection with the default collection editor, it
puts
<myitemlib.myitem someattr="someval1">...
instead of
<myitemlib:myitem someattr="someval1">...
(Use of period instead of colon.)
Code
----
In 'mycontrollib.dll':
public class myctrl1 : WebControl
{
[PersistenceMode(PersistenceMode.InnerProperty]
public MyItemColl Params
{...}
}
In 'myitemlib.dll':
public class MyItemColl : CollectionBase
{
public int Add(MyItem item)
{...}
public MyItem this[int Index]
{...}
}
public class MyItem : IParserAccessor, IComparable
{
....
}
definitions, just they are in another assembly:
<mycontrollib:myctrl1>
<Params>
<myitemlib:myitem someattr="someval1">
some text1
</myitemlib:myitem>
<myitemlib:myitem someattr="someval2">
some text2
</myitemlib:myitem>
</Params>
</mycontrollib:myctrl1>
When I drag the control on the page, all the dependencies will be
referenced under the "References" node, but the page will contain <@
Register TagPrefix...> only for 'mycontrollib'.
So Visual Studio throws an exception because it cannot find
'myitemlib'.
2nd problem
-----------
Inserting manually <@ Register TagPrefix...> for 'myitemlib' and
editing the 'Params' collection with the default collection editor, it
puts
<myitemlib.myitem someattr="someval1">...
instead of
<myitemlib:myitem someattr="someval1">...
(Use of period instead of colon.)
Code
----
In 'mycontrollib.dll':
public class myctrl1 : WebControl
{
[PersistenceMode(PersistenceMode.InnerProperty]
public MyItemColl Params
{...}
}
In 'myitemlib.dll':
public class MyItemColl : CollectionBase
{
public int Add(MyItem item)
{...}
public MyItem this[int Index]
{...}
}
public class MyItem : IParserAccessor, IComparable
{
....
}