Given the following
public class MyControl : CompositeControl
{
private DropDownList myList;
protected override void CreateChildControls()
{
base.CreateChildControls();
myList = new DropDownList();
myList.AutoPostBack = true;
this.Controls.Add(myList);
if (!Page.IsPostBack)
{...
dear friends ,
I created the composit control and put the formview inside that ,
I got this exception :
Unable to cast object of type 'System.Web.UI.LiteralControl' to type 'System.Web.UI.WebControls.Table'.
after set this line
if (!Page.IsPostBack) _template.InstantiateIn(_fv);
would you please help me to find the good solutio...
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 add a question to the collection editor list it generates a question tag for me.
Inside ea...
Hi, the below Default.aspx page(code behind is given below) contains a composite control. If we assign an Id to this composite control,while page rendering it creates multiple "ID" attribute for its child controls like "". Removing obj.ID = "MyCompositeControl" creates a single id for all child controls, but we can't set our own name. Co...
I have created a composite control that changes the controls in it based on the value of one of it's properties called "Type".
The intent is that once this "Type" property is set, it is not changed again for the life of the control, so the controls rendered as a result of the value of the "Type" property should not change.
I have overri...
I have a composite control that contains a different set of child controls based on the value of one of it's properties at runtime.
Whenever there is a postback, I get the following error:
Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during t...
I have a composite control that has a couple of private fields that reference values in the cache and these private fields are called during the constructor method. Since a string key is used to identify the value in the cache, I must have a way of storing that string key in such a way that it is available at the time the control is ins...
I have a composite control that contains a gridview.
The datasource for this gridview is passed in during the composite controls' instantiation. I am currently saving this datasource to a cache twice. Once for the "currentData" and once for the "OriginalData".
The composite control allows for the editing of the rows inside the gridvi...