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
9
votes
1 answer

Difference between a WebControl and a CompositeControl?

I have been looking around on the web and found some articles about the topic, but i still can't figure out the difference between them. I have the code show below, if i inherit from a CompositeControl it works perfectly but not if i inherit from a…
Patrick
  • 5,442
  • 9
  • 53
  • 104
5
votes
2 answers

Error Rendering control - [A] cannot be cast to [B] in the context LoadNeither

I am working on a composite control and this requires me to open multiple Visual studio IDEs and add the control on pages. This causes Visual Studio to create multiple assemblies. So every time this happens I close all IDEs, and delete…
markiz
  • 2,164
  • 6
  • 34
  • 47
4
votes
2 answers

Expose OnSelectedIndexChanged event in CompositeControl

If I have a DropDownList control that makes up part of a CompositeControl how can I expose the SelectedIndexChanged event to the consuming aspx page? Thanks
NikolaiDante
  • 18,469
  • 14
  • 77
  • 117
4
votes
2 answers

Should a DropDownList within a CompositeControl remember selected item?

Given the following public class MyControl : CompositeControl { private DropDownList myList; protected override void CreateChildControls() { base.CreateChildControls(); myList = new DropDownList(); …
tomfanning
  • 9,552
  • 4
  • 50
  • 78
4
votes
1 answer

WPF TabIndex in a composite control

I have a simple window with a simple composite control embedded within it. (Main Window)
Peter Morris
  • 20,174
  • 9
  • 81
  • 146
3
votes
1 answer

jQuery draggable image, stop dragging when mouse out of bounds(div)

I have a draggable image within a div functioning. However I would like to make it so if while the user has the mouse down and is dragging the element / div, when the mouse goes outside of the div when its down or its bounds it will no longer be…
user1199346
3
votes
3 answers

MVP Taligent Programming Model for .Net

Has anyone created a .NET control architecture using the taligent programming model as follows? http://www.wildcrest.com/Potel/Portfolio/mvp.pdf As stated by IBM - MVP will enable IBM to deliver a unified conceptual programming model across all its…
Firegarden
  • 362
  • 2
  • 10
3
votes
3 answers

Inheriting from a System.Web.UI.UserControl base class

First off, I am wondering if this is possible. I read slight grumblings around the internet about this, but I was not entirely sure. My scenario: I have a base chart class which has some methods which all charts should have. public partial class…
3
votes
2 answers

Getting the content of an ASP.NET System.Web.UI.WebControls.PlaceHolder

I have a server control that has a PlaceHolder that is an InnerProperty. In the class when rendering I need to get the text / HTML content that is supposed to be in the PlaceHolder. Here is a sample of what the front end code looks…
Payson Welch
  • 1,388
  • 2
  • 17
  • 29
3
votes
4 answers

Error Creating Control - Custom Control

I have a custom control and it works fine...except that the control cannot be rendered on Design Time. ( I am using VS 2008) I am thinking many people who develop custom controls encounter this problem...The error I get is "Error Creating Control - …
Sankar
3
votes
2 answers

Setting AssociatedControlID on label fails

I have a composite control that adds a TextBox and a Label control to its Controls collection. When i try to set the Label's AssociatedControlID to the ClientID of the Textbox i get this error Unable to find control with id…
Per Hornshøj-Schierbeck
  • 15,097
  • 21
  • 80
  • 101
3
votes
1 answer

How can I change child controls in a composite server control on postback

I have an ASP.NET web form composite control, let's call it control A, which contains a child composite control, which I'll call control B. The child controls of control B are dependent on a property of control A. On initial load I am setting this…
Rob West
  • 5,189
  • 1
  • 27
  • 42
3
votes
1 answer

How do I properly handle the viewstate of a child control within a composite control?

I have a composite control that contains a ListBox child control. On postback, the items for the ListBox disappear. I have a property for the ListBox that initializes it, and I add it to the controls collection in CreateChildControls. Am I doing…
Jeremy Cantrell
  • 26,392
  • 13
  • 55
  • 78
2
votes
1 answer

Using javascript in ASP.NET Composite control

I have a custom asp.net server control to display images.What I need now is to draw a rectangle on the center of image and the rectangle should be re sizable by dragging on its edges.Is it possible to accomplish this using JavaScript ?. I need to…
Senan
  • 411
  • 2
  • 6
  • 16
2
votes
1 answer

Can't cause client side validation within a composite control

I have a custom composite control that contains a text box, some validators, as well as several UI components. I am unable to get the client side validation to work at all. The server side validation works fine after the postback. I was…
Devin
  • 559
  • 4
  • 14
1
2 3 4 5 6 7