All Questions
Tagged with composite-controls asp.net
69 questions
1
vote
0
answers
28
views
Why Child Control of CompositeControl not show design mode?
IDE: Visual Studio 2019 Framework: .net Framework 4.7.2
Hello everyone, for the work project, I made a CompositeControl, which will contain a TextBox, and a WebControl.
My code as follows, and will ...
2
votes
1
answer
518
views
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 ...
1
vote
1
answer
32
views
Problems with ViewState of CompositeControl
I built a CompositeControl in ASP.Net and now I'm having trouble maintaining the ViewState of 3 instances of the Control on the hosting page. My CompositeControl has a property "HeaderText" and all 3 ...
1
vote
1
answer
121
views
How can I assign a property value based on another property in a composite control?
Environment: Asp.net 4.5, Webforms
I'm creating a composite control. I've exposed multiple public properties, but running into a slight problem.
Let's say I have two properties:
Public Property ...
0
votes
0
answers
35
views
Correct Pattern for creating Server Controls?
I am creating a server control (inheriting from CompositeControl).
The control comprises of several data bound drop down lists (and some textboxes etc).
The drop down lists form a hierarchy, so are ...
0
votes
1
answer
39
views
composite control renders after i need to use one of the properties (control lifecycle)
I have created a composite control for a file upload input (using an HtmlInputFile control). My problema is that everything works fine until I try to save the file using HtmlInputFile's "SaveAs" in my ...
2
votes
1
answer
755
views
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 ...
2
votes
1
answer
168
views
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 ...
0
votes
1
answer
66
views
Prevent clearing of child controls in composite control
I have a custom server control that the markup looks like such:
<myLib:MyControl id="myid" runat="server">
<controls>
<asp:Textbox id="TxtTest" runat="server" />
...
0
votes
1
answer
210
views
Getting data back from composite control added to placeholder on postback
I'm trying to create a factory pattern based on the CompositeControl class.
Everything is working fine. Except as I understand it I have to add the control back onto the placeholder control on my ...
2
votes
1
answer
596
views
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 ...
0
votes
1
answer
119
views
Applying a theme in a composite control
I have a composite control that creates a datagrid and other components. The control has the Themeable attribute set to true:
[ToolboxData("<{0}:MyCompositeControl runat=server />")]
[Themeable(...
0
votes
2
answers
6k
views
Setting TabIndex on TextBox within ASP.NET Dynamically Generated Controls?
I have a CompositeControl that each contain a TextBox (TextBoxA) and three Buttons (ButtonA, ButtonB, and ButtonC). My page generates n of these CompositeControls dynamically depending on the state of ...
1
vote
2
answers
1k
views
Repeater ItemCommand does not fire when clicking a button inside composite control
I have a Repeater containing nested custom CompositeControl controls in the following way:
Wrapper
Head
Body
<asp:UpdatePanel ID="noteArea" UpdateMode="Conditional" ChildrenAsTriggers="false"...
0
votes
1
answer
325
views
Recreate child controls and ViewState
Lets explain the problem with a simple case:
Lets CC be a composite control.
CC has a variable called filter (string) stored in viewState.
CC has 2 static child controls:
searchBox: Textbox
...
1
vote
0
answers
611
views
Dynamically wire up Button Click event in Composite Control
I have a custom composite control NoteHeaderDiv, containing a Button:
//NoteHeaderControl snippet
public event EventHandler OnEditClick;
protected void btnEdit_Click(object sender, EventArgs e)
{
...
1
vote
2
answers
2k
views
CreateChildControls called twice
I have a composite server control, where I implement CreateChildControls.
This control is a grid, which also includes paging and sorting controls.
When a sort link is clicked, CreateChildControls is ...
2
votes
2
answers
789
views
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 ...
1
vote
1
answer
347
views
Allow GridView sorting in Composite Control
I can't figure out, how to enable sorting in dynamically created GridView placed in my Composite Control. Of course, I try to set property AllowSorting of GridView to "true", but it does not allow ...
1
vote
2
answers
2k
views
How to create a templated composite control with a behavior
I'm trying to create a templated composite control that would work in a similar fashion as the "PasswordRecovery" control of ASP.Net.
By that, I mean that the user can define its own template but, ...
0
votes
2
answers
827
views
Design time issues with Composite Control with Devexpress control
i am creating a composite control class with several devexpress aspx control within it. However there is a issues in design time that is: whenever i change the child controls properties that i expose, ...
0
votes
1
answer
352
views
Calling javascript function after composite control rendering
Is there any way to call a javascript function after composite control rendering.I need to place four movable anchors on top of the image control. I am planning to implement the anchors using html Img ...
0
votes
2
answers
1k
views
Control HTML rendered by CompositeControl Templated Server Controls
I'm building my first custom server control which inherits from CompositeControl
The reason for the control is to be able to have a consistent content area (HTML elements) for multiple online ...
2
votes
1
answer
1k
views
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 ...
0
votes
1
answer
317
views
ASP.NET Composite control with Image control
I have created an asp.net composite control that consist of a Label, Text box and an Image control.I need to display the image in Image control without loosing aspect ratio.Maximum width and height of ...
0
votes
2
answers
3k
views
Multi level drop down menu without css hover effects asp.net jquery
I am looking to create a multi level drop down menu in asp.net using c# for a composite control. Does anyone know, or know any pointers on how to create it?
I've looked at system.ui.webcontrols.menu, ...
0
votes
1
answer
203
views
Composite Controls JQuery and Apostrophes being encoded
I am having an issue where composite child controls are encoding strings to HTML. I have a child control button that is set like so:
b.OnClientClick = "$('#pic').rotateRight();";
the trouble with ...
0
votes
2
answers
406
views
asp.net webforms - composite controls interacting with page controls
I am writing a composite control in c# asp.net as an experiment and would like to have all the instances of my composite control interact with one external control. Is this possible?
Things I have ...
2
votes
1
answer
425
views
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 ...
1
vote
1
answer
927
views
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 ...
0
votes
2
answers
213
views
CMS content editor / viewer
One of our users has decided that they need to be able to edit sections of content on our main website and I've been given the task of implementing it. The underlying model is that one or more divs in ...
0
votes
1
answer
202
views
Custom Composite Control
I've Creted Composite control which has FormView and two custom server control. The Control renders correctly. now when i add control to page from toolbox i want to edit Composite Control's FormView ...
0
votes
1
answer
593
views
Which control to choose? WebControl or CompositeControl that is the question
I'm looking forward to create some customs controls like AutoCompletes, TagClouds and others. To use in my projects as tools without need to worry every time that i need one of them.
i saw in This ...
1
vote
1
answer
704
views
ASP.NET composite control doesn't bubble event but template does
I am developing a composite control for an ASP.NET application and just by chance initially developed the control to use an ITemplate to create its child controls. There will be a series of buttons ...
3
votes
3
answers
9k
views
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 ...
1
vote
1
answer
765
views
MSDN example of Composite Control
I'm reading through some MSDN example code on Composite controls and finding that there is one thing I don't understand. Using the code here I've created the LabelTextBox control in my project and ...
3
votes
2
answers
4k
views
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 ...
2
votes
1
answer
492
views
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....
0
votes
3
answers
1k
views
How to save value across postbacks for a composite control without using viewstate
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 ...
2
votes
1
answer
2k
views
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 ...
4
votes
2
answers
987
views
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();
...
1
vote
1
answer
442
views
Adding jquery into a composite control
I am creating a composite control that has a textbox and uses a jquery plugin to add a watermark. Lets say I have a basic function that looks like this
$(function () {$('#MyTextBoxID').watermark('...
1
vote
2
answers
899
views
Add ability to provide list items to composite control with DropDownLIst
I'm creating a composite control for a DropDownList (that also includes a Label).
The idea being that I can use my control like a dropdown list, but also have it toss a Label onto the page in front ...
1
vote
1
answer
427
views
Persisting a collection backed by viewstate in a CompositeControl
Maybe it's been a long day but I'm having trouble persisting a collection backed by the ASP.NET ViewState in a CompositeControl. Here's a simplified version:
public class MyControl : CompositeControl
...
0
votes
1
answer
332
views
Composite control property that allows coder to select from options
The question is in the title but to make it clearer when you use a normal server control like
<asp:textbox />
<CC1:CtrlArticleList SortBy="Title" ID="compositeControlArticleList" runat="...
1
vote
1
answer
1k
views
Converting listview to a composite control
The link below shows a listview composite control in its most basic form however I can't seem to extend this to what I'm trying to do.
How to define listview templates in code
My listview has 1 ...
0
votes
1
answer
1k
views
Text-property of my ASP.NET Composite-control doesn't set text-changes
I have build a composite control which renders a TextControl or a RADEditor control, dependable of a property a set. Both rendered controls have a Text-property. The problem is that when I change the ...
0
votes
1
answer
3k
views
DropDownList within composite control is losing selected value on postback
I am building a composite server control that currently only has a TextBox and a DropDownList. Here is the code in all its foetal glory:
public Address : CompositeControl
{
private string[] ...
1
vote
1
answer
1k
views
ASP CompositeControl & ScriptManager
I'm really new to the WebControl / CompositeControl world, and I have a small test class I am playing with. It's just a LinkButton that updates when clicked. Things work great when I leave it out of ...
3
votes
1
answer
577
views
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 ...