|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ITemplates wrapped in extra <div> tags by .net 2.0 / MCMSI'm trying to create a templated server control in .net 2.0 (for MCMS), but all control's templated items are wrapped in <div> tags (which they shouldn't be) Any idea why this is producing extra divs? Let me know if you need more code Thanks. I'm got the following code: ----- WebControl.cs ----- .... [PersistenceMode(PersistenceMode.InnerProperty)] [TemplateContainer(typeof(Item))] public virtual ITemplate ItemTemplate; // get / set are defined here in my actual code public override void DataBind() { CreateChildControls(); ChildControlsCreated = true; base.DataBind(); } protected override void CreateChildControls() { this.Controls.Clear(); foreach (ChannelItem channelItem in _rootChannel.Channels) { Item item = new Item(channelItem); ITemplate itemTemplate = ItemTemplate; itemCloseTemplate.InstantiateIn(item); Controls.Add(item); } } .... ----- with the ASPX code ----- <ul> <cc1:WebControl runat="server" > <ItemTemplate><li><a href="<%# Container.Url %>"><%# Container.Title %></a></li></ItemTemplate> </cc1:WebControl> </ul> ----- This outputs the following ----- <ul><div> <li><a href="...">Item</a></li> </div><div> <li><a href="...">Item</a></li> </div></ul> ----- Should be just ----- <ul> <li><a href="...">Item</a></li> <li><a href="...">Item</a></li> </ul>
how to get the text in JS of a cell created on server?
can get forecolor but not background color in Javascript Web User Controls(ascx) 1.1 VS 2.0 questions about Controls.add HyperLink control vs. Firefox FormView/Repeater/ Eval(FormView data) multiple datagrids on same page paging broken FormView - set mode in aspx based on url param ASP.Menu in IE6, cannot select menu item when... making a dropdownlist visible when clicking in a textbox of a detailsview? |
|||||||||||||||||||||||