Priority
Show-stopper
Type
Bug 
State
Fixed 
Assignee
Sergey Coox 
Subsystem
Language - ASP.NET 
Affected versions
Fixed in
Fixed in build
Next build 
Fixed in build
256
  • Submitted by   Sergey Coox
    3 years ago (06 Aug 2006 17:20)
  • Updated by Sergey Coox
    3 years ago (09 Sep 2006 13:33)
  • Jira: RSRP-25104
    (history, comments)

RSRP-25104

custom control items collection

0
<%@ Register Namespace="Retail.UI.Web.Controls" TagPrefix="retail" %>
...
<retail:Options ID="opt" runat="server">
<retail:Option Text="?????1">
</retail:Option>
<retail:Option Text="?????2">
</retail:Option>
</retail:Options>
...



---- class with control
using System.Collections.Generic;
using System.ComponentModel;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Retail.UI.Web.Controls
{
[ToolboxData("<{0}:Options runat=server></{0}:Options>")]
[DefaultProperty("Items")]
[ParseChildren(true, "Items")]
public class Options : WebControl
{
private List<Option> _list;

public Options()
{
_list = new List<Option>();
this.EnableViewState = false;
}

[PersistenceMode(PersistenceMode.InnerDefaultProperty)]
[Themeable(false)]
public List<Option> Items
{
get { return _list; }
}

protected override void RenderContents(HtmlTextWriter writer)
{
// ...
}

}

[ParseChildren(false)]
[PersistChildren(false)]
public class Option
{
private string _text;

public Option()
{
}

public string Text
{
get { return _text; }
set { _text = value; }
}
}

}



Issue was closed
Comments (0)
 
History (0)
 
Links
 
Issue has no comments