» Home » control » Page 1
How to call an event handler from one control to the another control where the second control is inside the first control?
by Caleb Ames in Programming Languages

i have a calender control like this

<asp:Calendar ID="CldrDemo" runat="server" BackColor="#FFFFCC" BorderColor="#FFCC66"
OnSelectionChanged="CldrDemo_SelectionChanged" OnDayRender="CldrDemo_DayRender">

OnDayRender event i have code like this

protected void CldrDemo_DayRender(object sender,

ScriptManager.RegisterStartupScript fails with error “The control must be in the control tree of a page. Parameter name: control”
by Brandan in Programming Languages

I'm creating a custom web control, basically extending RadTextBox since it doesn't have onBlur() event. I added a script in the .ascx file. I am trying to register the script but it fails. I'm not sure what I'm missing here.

<script language="javascript">
function handleLostFocus(o) {
public part

In a WPF user control, how do I specify coordinates relative to the control's total size, so that the control will scale correctly?
by Kuer in Programming Languages

I have created this simple expand button user control with WPF:


I designed the thing with Width and Height both set to 100 so that I could see what I'm actually doing. The stripped-down XAML of this user control is:

<UserControl x:Class="Foobar.ExpandButton"

Selecting and building a Control from a control library dynamically, using the control name from a table
by Jan D in Programming Languages

I have a custom DDL that lives in my Server control library.

Currently I add this control to a table by strongly typing the name of the control, the customary way.

Control_Library.Report_NumberDDL newDDL = new Control_Library.Report_NumberDDL();

What I want to be able to do is dynamically create that control by pulling the control name from a ta

Interview Question: When Control.InvokeRequired do you use Control.Invoke or Control.BeginInvoke?
by MadViking in Programming Languages

I have had recently one of those really bad interviews, where they play good cop/bad cop with you. Whatever I replied wasn't good enough for one of them and my confidence was shrinking minute by minute. His final question that really confused me was the following:

if a control would need InvokeRequired would there be a difference in doing .Invoke or .BeginInvoke?

Let me

Adding Control to Container Control that is in User Control - How to properly initialize?
by Puddle Jumper in Programming Languages

Let's say I have a user control MyUserControl, which has a container control (it's a server control, but it could just be a Panel) and a dropdownlist. The dropdownlist is not in the container control initially. In it's code-behind, I am overriding OnInit and creating the user control, which includes populating a dropdownlist and adding that dropdownlist to my container control. I have a publ

How to check if a control is child of another control? “Control.IsChildOf”
by Peter Z in Programming Languages

I have 3 panels:

<asp:Panel ID="ParentPanel" runat="server">
<asp:Panel ID="AnnoyingPanel" runat="server">
<asp:Panel ID="P" runat="server">

How can I check if P is child of ParentPanel? Is there some LINQish wa

Does a composite server control(inc. user control, custom server control) normally encapsulate css properties?
by nchaimov in Programming Languages

If a composite server control normally encapsulate styling information inside, it is an example of code encapsulation and modularization. However if css properties are included inside the composite control, it is not ideal for code/styling separation and css code re-use principles. Now which consideration should be the main consideration?

How to add a reference to a method in a custom control to a child control created in that same custom control
by mrmt in Programming Languages

I have a custom control that is based off the gridview control located at: here

The control is basically a gridview that automatically creates a column of checkboxes that can be used to "check" individual rows in the gridview.
During the gridview's "CreateColumns" event, the "checkboxcolumn" is created dynamically. The checkboxcolumn also contains another checkbox in the heade

Dynamically add user control in page ON button click whic is also in user control (ModalPopExtender in user control)
by yodude7 in Programming Languages

I have a simple user control which I want to create dynamically every time user click button (button also saves data in db.) This is just a kind of Discussion forum where user reply and it appears beneath message.

When user click on Reply button a ModalPopupExtender window pops up and user enter its reply and submit.

When I click on submit in popup data get saved in db

Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .