Questions tagged [composite-controls]

In User Interface frameworks, a composite control is a control _composed_ of other existing child controls.

In User Interface frameworks, a composite control is a control composed of other existing child controls (a control being a UI element that the user can interact with such as a slider or a button).

The idea is create a custom control without having to develop the rendering of the control: it is delegated to the child controls. A composite control can itself be re-used as a child control of a higher composite control, thus making a hierarchy of controls.

.NET reference documentation about composite controls: http://msdn.microsoft.com/en-us/library/aa719968(v=vs.71).aspx

96 questions
2
votes
2 answers

How can I have an ASP.NET templated composite control?

I am trying to add a template to a simplified composite control containing a Label and a TextBox. I want my mark up to look something like this:
rmw
  • 1,253
  • 1
  • 12
  • 20
2
votes
1 answer

Saving ViewState in Nested DropDownList in a Custom Control

I created a custom control (called BoostrapDropDown) that essentially wraps a bunch of boostrap markup around a asp.net DropDownList. The resulting control hierarchy will look basically like the following with everything being a HtmlGenericControl…
Terry
  • 2,148
  • 2
  • 32
  • 53
2
votes
1 answer

Creating Custom WPF Controls in IronPython: a control made up out of standard controls

I've looked at the other custom control creation questions on here, as well as other online resources, but I'm lost as to how to create a custom control that doesn't require a C# code-behind file. Since my project is pure IronPython, I don't know…
Aphex
  • 7,390
  • 5
  • 33
  • 54
2
votes
1 answer

How to remove parent control without deleting its children in asp.net c#?

I want to remove parent control (which is span in this case) without deleting its children controls from container. how can I accomplish this in asp.net c#? you can see the code here: http://pastebin.com/9NiriWXN Note: I can easily find the…
code master
  • 2,026
  • 5
  • 30
  • 49
2
votes
1 answer

Asp Composite control child control (radiobutton) losing checked value

I am working on a quiz control in asp.net with dynamically created questions and options. The main control is basically a container to hold all of the questions. In design view users can add questions through a custom Collection Editor. Everytime i…
Jurgen Welschen
  • 871
  • 1
  • 13
  • 21
2
votes
1 answer

ASP.Net User Controls shared between multiple projects

All, My requirement is fairly simple. I have a asp.net page that I need to use in multiple projects. All the server controls and code behind needs to be the exact same on all projects. If I need to reuse the code and have one common point for the…
Ron
  • 886
  • 13
  • 39
2
votes
1 answer

DataBind on CompositeControls

I have a composite control that has a DropDownList inside. The problem i have is the next one: When i load the data on the Page_Load (the first time the page is loaded) everything works fine, but when there is a postback and i want to refresh the…
ascherman
  • 1,762
  • 2
  • 20
  • 41
2
votes
1 answer

Why should I create my child controls in CreateChildControls() on a CompositeControl?

Ok so the obvious answer is, because the flow of a composite control demands my childcontrols to be created at a certain point in time. I got a problem i think other people must have had as well. My control is a composite "container/collection"…
Per Hornshøj-Schierbeck
  • 15,097
  • 21
  • 80
  • 101
2
votes
1 answer

CompositeControl and XML Deserialization on design-time error

I get "Error rendering control" error that only happens when I place the control on the webform in desgin-mode, if I run the page the control is displayed correctly. The above statement is not important, this error happens because the returned…
markiz
  • 2,164
  • 6
  • 34
  • 47
2
votes
1 answer

ASP.NET CompositeControl: Firing 2 (or more) events after postback

I'm fairly new to asp.net CompositeControls... I have a task which requires me to add a 1 button on load, then when the user clicks it, another button gets added, and when the second button is clicked a label is shown. The problem is after clicking…
Reyno
  • 583
  • 13
  • 28
2
votes
2 answers

Custom Validator in a Composite Control not firing

I am badly stuck in middle of project with this issue. Googled a lot but not getting a solution. My objective is to create a composite control with a label, textbox, two required field validator and a custom validator. My custom control code is as…
Sameer
  • 21
  • 3
2
votes
1 answer

ASP.Net CustomValidator in a CompositeControl

I present to you a little mystery... the following control is intended to fail validation every time, no matter what, but it does not: public class Test : CompositeControl { protected override void CreateChildControls() { …
Generic Error
  • 4,437
  • 6
  • 28
  • 26
2
votes
2 answers

ASP.NET Composite Control raise event to parent form

Say I have a composite control in ASP.NET (C#) which includes a drop down list. I need to be able to bubble the event back to the parent form so that other code can be executed based on its SelectedItem. How do I expose the OnSelectedItemChanged…
Mauro
  • 4,531
  • 3
  • 30
  • 56
1
vote
1 answer

Postback From Controls inside Composite Web Control

Let's say we have a composite web control with a combobox and a textbox. Is it possible to build into the control functionality such that when the text in the textbox changes, it posts back and adds the value as an option in the combobox? I know…
1
vote
1 answer

Hiding Control Attributes in ASP.Net

I am building a composite control that is composed of an Infragistics WebDataGrid, an add Button, and some ModalPopupExtenders. I want design-time usage of this composite control to be as simple as possible. Meaning, as soon as they type not want…
JonathanWolfson
  • 861
  • 4
  • 20
  • 30